diff options
Diffstat (limited to 'src/aig/ivy/ivyMem.c')
-rw-r--r-- | src/aig/ivy/ivyMem.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/aig/ivy/ivyMem.c b/src/aig/ivy/ivyMem.c index 09c73c49..2a96857c 100644 --- a/src/aig/ivy/ivyMem.c +++ b/src/aig/ivy/ivyMem.c @@ -87,15 +87,16 @@ void Ivy_ManAddMemory( Ivy_Man_t * p ) { char * pMemory; int i, nBytes; - assert( sizeof(Ivy_Obj_t) <= 64 ); + int EntrySizeMax = 128; + assert( sizeof(Ivy_Obj_t) <= EntrySizeMax ); assert( p->pListFree == NULL ); // assert( (Ivy_ManObjNum(p) & IVY_PAGE_MASK) == 0 ); // allocate new memory page - nBytes = sizeof(Ivy_Obj_t) * (1<<IVY_PAGE_SIZE) + 64; + nBytes = sizeof(Ivy_Obj_t) * (1<<IVY_PAGE_SIZE) + EntrySizeMax; pMemory = ALLOC( char, nBytes ); Vec_PtrPush( p->vChunks, pMemory ); // align memory at the 32-byte boundary - pMemory = pMemory + 64 - (((int)pMemory) & 63); + pMemory = pMemory + EntrySizeMax - (((int)pMemory) & (EntrySizeMax-1)); // remember the manager in the first entry Vec_PtrPush( p->vPages, pMemory ); // break the memory down into nodes |