diff options
Diffstat (limited to 'src/aig/aig/aigMem.c')
-rw-r--r-- | src/aig/aig/aigMem.c | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/src/aig/aig/aigMem.c b/src/aig/aig/aigMem.c index c0b76ff8..a21b812d 100644 --- a/src/aig/aig/aigMem.c +++ b/src/aig/aig/aigMem.c @@ -20,6 +20,9 @@ #include "aig.h" +ABC_NAMESPACE_IMPL_START + + //////////////////////////////////////////////////////////////////////// /// DECLARATIONS /// //////////////////////////////////////////////////////////////////////// @@ -31,7 +34,7 @@ struct Aig_MmFixed_t_ int nEntriesAlloc; // the total number of entries allocated int nEntriesUsed; // the number of entries in use int nEntriesMax; // the max number of entries in use - char * pEntriesFree; // the linked list of ABC_FREE entries + char * pEntriesFree; // the linked list of free entries // this is where the memory is stored int nChunkSize; // the size of one chunk @@ -48,8 +51,8 @@ struct Aig_MmFlex_t_ { // information about individual entries int nEntriesUsed; // the number of entries allocated - char * pCurrent; // the current pointer to ABC_FREE memory - char * pEnd; // the first entry outside the ABC_FREE memory + char * pCurrent; // the current pointer to free memory + char * pEnd; // the first entry outside the free memory // this is where the memory is stored int nChunkSize; // the size of one chunk @@ -160,7 +163,7 @@ char * Aig_MmFixedEntryFetch( Aig_MmFixed_t * p ) char * pTemp; int i; - // check if there are still ABC_FREE entries + // check if there are still free entries if ( p->nEntriesUsed == p->nEntriesAlloc ) { // need to allocate more entries assert( p->pEntriesFree == NULL ); @@ -189,7 +192,7 @@ char * Aig_MmFixedEntryFetch( Aig_MmFixed_t * p ) p->nEntriesUsed++; if ( p->nEntriesMax < p->nEntriesUsed ) p->nEntriesMax = p->nEntriesUsed; - // return the first entry in the ABC_FREE entry list + // return the first entry in the free entry list pTemp = p->pEntriesFree; p->pEntriesFree = *((char **)pTemp); return pTemp; @@ -210,7 +213,7 @@ void Aig_MmFixedEntryRecycle( Aig_MmFixed_t * p, char * pEntry ) { // decrement the counter of used entries p->nEntriesUsed--; - // add the entry to the linked list of ABC_FREE entries + // add the entry to the linked list of free entries *((char **)pEntry) = p->pEntriesFree; p->pEntriesFree = pEntry; } @@ -245,7 +248,7 @@ void Aig_MmFixedRestart( Aig_MmFixed_t * p ) } // set the last link *((char **)pTemp) = NULL; - // set the ABC_FREE entry list + // set the free entry list p->pEntriesFree = p->pChunks[0]; // set the correct statistics p->nMemoryAlloc = p->nEntrySize * p->nChunkSize; @@ -363,7 +366,7 @@ void Aig_MmFlexStop( Aig_MmFlex_t * p, int fVerbose ) char * Aig_MmFlexEntryFetch( Aig_MmFlex_t * p, int nBytes ) { char * pTemp; - // check if there are still ABC_FREE entries + // check if there are still free entries if ( p->pCurrent == NULL || p->pCurrent + nBytes > p->pEnd ) { // need to allocate more entries if ( p->nChunks == p->nChunksAlloc ) @@ -591,3 +594,5 @@ int Aig_MmStepReadMemUsage( Aig_MmStep_t * p ) //////////////////////////////////////////////////////////////////////// /// END OF FILE /// //////////////////////////////////////////////////////////////////////// +ABC_NAMESPACE_IMPL_END + |