Changeset 281335 in git


Ignore:
Timestamp:
Apr 6, 2016, 2:16:24 PM (8 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
6538bdbf4f61760cc2956dcad64e92c75f6531e6
Parents:
9e5efff5850edfdd2e6e724e90a5513daf76327c
Message:
intvec: new/delete via omallocClass
Location:
libpolys/misc
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • libpolys/misc/int64vec.h

    r9e5efff r281335  
    88*/
    99#include <string.h>
    10 #include <omalloc/omalloc.h>
     10#include <omalloc/omallocClass.h>
    1111#include <misc/auxiliary.h>
    1212#include <misc/intvec.h>
    1313
    14 class int64vec
     14class int64vec :public omallocClass
    1515{
    1616private:
     
    8989
    9090#endif
    91 
    92 
    93 
    94 
    95 
    96 
    97 
    98 
    99 
    100 
    101 
  • libpolys/misc/intvec.cc

    r9e5efff r281335  
    88#define INTVEC_CC
    99
    10 
    11 
    12 
    13 
    1410#include <misc/auxiliary.h>
    1511
     
    2319
    2420/*0 implementation*/
    25 
    26 omBin intvec_bin = omGetSpecBin(sizeof(intvec));
    2721
    2822intvec::intvec(int s, int e)
  • libpolys/misc/intvec.h

    r9e5efff r281335  
    88*/
    99#include <string.h>
    10 #include <omalloc/omalloc.h>
     10#include <omalloc/omallocClass.h>
    1111#include <reporter/reporter.h>
    1212
    1313
    14 extern omBin intvec_bin;
    15 
    16 class intvec
     14class intvec :public omallocClass
    1715{
    1816private:
     
    123121    return m;
    124122  }
    125   void* operator new ( size_t size )
    126   {
    127     void* addr;
    128     //omTypeAlloc(void*, addr, size);
    129     addr=omAlloc0Bin(intvec_bin);
    130     return addr;
    131   }
    132   void operator delete ( void* block )
    133   { //omfree( block );
    134     omFreeBin((ADDRESS)block, intvec_bin);
    135   }
    136123  // keiner (ausser obachman) darf das folgenden benutzen !!!
    137124  inline int * ivGetVec() { return v; }
Note: See TracChangeset for help on using the changeset viewer.