summaryrefslogtreecommitdiffstats
path: root/src/sat/msat/msatMem.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/sat/msat/msatMem.c')
-rw-r--r--src/sat/msat/msatMem.c21
1 files changed, 13 insertions, 8 deletions
diff --git a/src/sat/msat/msatMem.c b/src/sat/msat/msatMem.c
index 439661f4..7e0dc0dd 100644
--- a/src/sat/msat/msatMem.c
+++ b/src/sat/msat/msatMem.c
@@ -20,6 +20,9 @@
#include "msatInt.h"
+ABC_NAMESPACE_IMPL_START
+
+
////////////////////////////////////////////////////////////////////////
/// DECLARATIONS ///
////////////////////////////////////////////////////////////////////////
@@ -31,7 +34,7 @@ struct Msat_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 Msat_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 * Msat_MmFixedEntryFetch( Msat_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 * Msat_MmFixedEntryFetch( Msat_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 Msat_MmFixedEntryRecycle( Msat_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;
}
@@ -244,7 +247,7 @@ void Msat_MmFixedRestart( Msat_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;
@@ -346,7 +349,7 @@ void Msat_MmFlexStop( Msat_MmFlex_t * p, int fVerbose )
char * Msat_MmFlexEntryFetch( Msat_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 )
@@ -527,3 +530,5 @@ int Msat_MmStepReadMemUsage( Msat_MmStep_t * p )
nMemTotal += p->pMems[i]->nMemoryAlloc;
return nMemTotal;
}
+ABC_NAMESPACE_IMPL_END
+