abc-master
|
#include "misc/util/abc_global.h"
Go to the source code of this file.
Typedefs | |
typedef typedefABC_NAMESPACE_HEADER_START struct Mem_Fixed_t_ | Mem_Fixed_t |
DECLARATIONS ///. More... | |
typedef struct Mem_Flex_t_ | Mem_Flex_t |
typedef struct Mem_Step_t_ | Mem_Step_t |
Functions | |
Mem_Fixed_t * | Mem_FixedStart (int nEntrySize) |
FUNCTION DEFINITIONS ///. More... | |
void | Mem_FixedStop (Mem_Fixed_t *p, int fVerbose) |
char * | Mem_FixedEntryFetch (Mem_Fixed_t *p) |
void | Mem_FixedEntryRecycle (Mem_Fixed_t *p, char *pEntry) |
void | Mem_FixedRestart (Mem_Fixed_t *p) |
int | Mem_FixedReadMemUsage (Mem_Fixed_t *p) |
int | Mem_FixedReadMaxEntriesUsed (Mem_Fixed_t *p) |
Mem_Flex_t * | Mem_FlexStart () |
void | Mem_FlexStop (Mem_Flex_t *p, int fVerbose) |
char * | Mem_FlexEntryFetch (Mem_Flex_t *p, int nBytes) |
void | Mem_FlexRestart (Mem_Flex_t *p) |
int | Mem_FlexReadMemUsage (Mem_Flex_t *p) |
Mem_Step_t * | Mem_StepStart (int nSteps) |
void | Mem_StepStop (Mem_Step_t *p, int fVerbose) |
char * | Mem_StepEntryFetch (Mem_Step_t *p, int nBytes) |
void | Mem_StepEntryRecycle (Mem_Step_t *p, char *pEntry, int nBytes) |
int | Mem_StepReadMemUsage (Mem_Step_t *p) |
typedef typedefABC_NAMESPACE_HEADER_START struct Mem_Fixed_t_ Mem_Fixed_t |
DECLARATIONS ///.
CFile****************************************************************
FileName [mem.h]
SystemName [ABC: Logic synthesis and verification system.]
PackageName [Memory management.]
Synopsis [External declarations.]
Author [Alan Mishchenko]
Affiliation [UC Berkeley]
Date [Ver. 1.0. Started - June 20, 2005.]
Revision [
]
typedef struct Mem_Flex_t_ Mem_Flex_t |
typedef struct Mem_Step_t_ Mem_Step_t |
char* Mem_FixedEntryFetch | ( | Mem_Fixed_t * | p | ) |
void Mem_FixedEntryRecycle | ( | Mem_Fixed_t * | p, |
char * | pEntry | ||
) |
int Mem_FixedReadMaxEntriesUsed | ( | Mem_Fixed_t * | p | ) |
Function*************************************************************
Synopsis []
Description []
SideEffects []
SeeAlso []
int Mem_FixedReadMemUsage | ( | Mem_Fixed_t * | p | ) |
Function*************************************************************
Synopsis []
Description []
SideEffects []
SeeAlso []
void Mem_FixedRestart | ( | Mem_Fixed_t * | p | ) |
Mem_Fixed_t* Mem_FixedStart | ( | int | nEntrySize | ) |
FUNCTION DEFINITIONS ///.
Function*************************************************************
Synopsis [Allocates memory pieces of fixed size.]
Description [The size of the chunk is computed as the minimum of 1024 entries and 64K. Can only work with entry size at least 4 byte long.]
SideEffects []
SeeAlso []
Definition at line 100 of file mem.c.
void Mem_FixedStop | ( | Mem_Fixed_t * | p, |
int | fVerbose | ||
) |
char* Mem_FlexEntryFetch | ( | Mem_Flex_t * | p, |
int | nBytes | ||
) |
int Mem_FlexReadMemUsage | ( | Mem_Flex_t * | p | ) |
Function*************************************************************
Synopsis []
Description []
SideEffects []
SeeAlso []
void Mem_FlexRestart | ( | Mem_Flex_t * | p | ) |
Mem_Flex_t* Mem_FlexStart | ( | ) |
void Mem_FlexStop | ( | Mem_Flex_t * | p, |
int | fVerbose | ||
) |
char* Mem_StepEntryFetch | ( | Mem_Step_t * | p, |
int | nBytes | ||
) |
void Mem_StepEntryRecycle | ( | Mem_Step_t * | p, |
char * | pEntry, | ||
int | nBytes | ||
) |
int Mem_StepReadMemUsage | ( | Mem_Step_t * | p | ) |
Mem_Step_t* Mem_StepStart | ( | int | nSteps | ) |
Function*************************************************************
Synopsis [Starts the hierarchical memory manager.]
Description [This manager can allocate entries of any size. Iternally they are mapped into the entries with the number of bytes equal to the power of 2. The smallest entry size is 8 bytes. The next one is 16 bytes etc. So, if the user requests 6 bytes, he gets 8 byte entry. If we asks for 25 bytes, he gets 32 byte entry etc. The input parameters "nSteps" says how many fixed memory managers are employed internally. Calling this procedure with nSteps equal to 10 results in 10 hierarchically arranged internal memory managers, which can allocate up to 4096 (1Kb) entries. Requests for larger entries are handed over to malloc() and then ABC_FREE()ed.]
SideEffects []
SeeAlso []
void Mem_StepStop | ( | Mem_Step_t * | p, |
int | fVerbose | ||
) |