Changeset f79b94c in git for factory/int_poly.h


Ignore:
Timestamp:
Sep 4, 2000, 3:31:31 PM (24 years ago)
Author:
Olaf Bachmann <obachman@…>
Branches:
(u'spielwiese', '4a9821a93ffdc22a6696668bd4f6b8c9de3e6c5f')
Children:
ec7aac79223c2edb9fd5358c0f2f3e8ddcd120e6
Parents:
05e7d13dce909dfa04b941da1c487b7c2a3a6044
Message:
* support for omalloc


git-svn-id: file:///usr/local/Singular/svn/trunk@4564 2c84dea3-7e68-4137-9b89-c4e89433aadc
File:
1 edited

Legend:

Unmodified
Added
Removed
  • factory/int_poly.h

    r05e7d13 rf79b94c  
    11/* emacs edit mode for this file is -*- C++ -*- */
    2 /* $Id: int_poly.h,v 1.6 1998-06-26 16:15:08 schmidt Exp $ */
     2/* $Id: int_poly.h,v 1.7 2000-09-04 13:31:31 obachman Exp $ */
    33
    44#ifndef INCL_INT_POLY_H
     
    1616#include "canonicalform.h"
    1717
     18#ifdef HAVE_OMALLOC
     19#include <omalloc.h>
     20#endif
    1821
    1922class term {
     
    2225    CanonicalForm coeff;
    2326    int exp;
     27#ifdef HAVE_OMALLOC
     28  static const omBin term_bin;
     29#endif
    2430public:
    2531    term() : next(0), coeff(0), exp(0) {}
     
    2733    friend class InternalPoly;
    2834    friend class CFIterator;
     35#ifdef HAVE_OMALLOC
     36  void* operator new(size_t size)
     37    {
     38      void* addr;
     39      omTypeAllocBin(void*, addr, term_bin);
     40      return addr;
     41    }
     42  void operator delete(void* addr, size_t size)
     43    {
     44      omFreeBin(addr, term_bin);
     45    }
     46#endif
    2947};
    3048
     
    108126    int sign() const;
    109127
     128#ifdef HAVE_OMALLOC
     129  static const omBin InternalPoly_bin;
     130  void* operator new(size_t size)
     131    {
     132      void* addr;
     133      omTypeAllocBin(void*, addr, InternalPoly_bin);
     134      return addr;
     135    }
     136  void operator delete(void* addr, size_t size)
     137    {
     138      omFreeBin(addr, InternalPoly_bin);
     139    }
     140#endif
    110141    friend class CFIterator;
    111142};
Note: See TracChangeset for help on using the changeset viewer.