
Go to the source code of this file.
Classes | |
| struct | Mem_Fixed_t_ |
| DECLARATIONS ///. More... | |
| struct | Mem_Flex_t_ |
| struct | Mem_Step_t_ |
Functions | |
| Mem_Fixed_t * | Mem_FixedStart (int nEntrySize) |
| FUNCTION DEFINITIONS ///. | |
| void | Mem_FixedStop (Mem_Fixed_t *p, int fVerbose) |
| void | Mem_FlexStop2 (Mem_Flex_t *p) |
| 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) |
| char * Mem_FixedEntryFetch | ( | Mem_Fixed_t * | p | ) |
Function*************************************************************
Synopsis []
Description []
SideEffects []
SeeAlso []
Definition at line 184 of file mem.c.

| void Mem_FixedEntryRecycle | ( | Mem_Fixed_t * | p, |
| char * | pEntry ) |
Function*************************************************************
Synopsis []
Description []
SideEffects []
SeeAlso []
Definition at line 235 of file mem.c.

| int Mem_FixedReadMaxEntriesUsed | ( | Mem_Fixed_t * | p | ) |
| int Mem_FixedReadMemUsage | ( | Mem_Fixed_t * | p | ) |
| void Mem_FixedRestart | ( | Mem_Fixed_t * | p | ) |
Function*************************************************************
Synopsis []
Description [Relocates all the memory except the first chunk.]
SideEffects []
SeeAlso []
Definition at line 255 of file mem.c.

| 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 ) |
Function*************************************************************
Synopsis []
Description []
SideEffects []
SeeAlso []
Definition at line 139 of file mem.c.

| char * Mem_FlexEntryFetch | ( | Mem_Flex_t * | p, |
| int | nBytes ) |
Function*************************************************************
Synopsis []
Description []
SideEffects []
SeeAlso []
Definition at line 388 of file mem.c.

| int Mem_FlexReadMemUsage | ( | Mem_Flex_t * | p | ) |
| void Mem_FlexRestart | ( | Mem_Flex_t * | p | ) |
Function*************************************************************
Synopsis []
Description [Relocates all the memory except the first chunk.]
SideEffects []
SeeAlso []
| Mem_Flex_t * Mem_FlexStart | ( | ) |
Function*************************************************************
Synopsis [Allocates entries of flexible size.]
Description [Can only work with entry size at least 4 byte long.]
SideEffects []
SeeAlso []
Definition at line 327 of file mem.c.


| void Mem_FlexStop | ( | Mem_Flex_t * | p, |
| int | fVerbose ) |
Function*************************************************************
Synopsis []
Description []
SideEffects []
SeeAlso []
Definition at line 359 of file mem.c.

| void Mem_FlexStop2 | ( | Mem_Flex_t * | p | ) |
| char * Mem_StepEntryFetch | ( | Mem_Step_t * | p, |
| int | nBytes ) |
Function*************************************************************
Synopsis [Creates the entry.]
Description []
SideEffects []
SeeAlso []
Definition at line 553 of file mem.c.

| void Mem_StepEntryRecycle | ( | Mem_Step_t * | p, |
| char * | pEntry, | ||
| int | nBytes ) |
Function*************************************************************
Synopsis [Recycles the entry.]
Description []
SideEffects []
SeeAlso []
Definition at line 586 of file mem.c.

| int Mem_StepReadMemUsage | ( | Mem_Step_t * | p | ) |
Function*************************************************************
Synopsis []
Description []
SideEffects []
SeeAlso []
Definition at line 609 of file mem.c.

| 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 []
Definition at line 490 of file mem.c.


| void Mem_StepStop | ( | Mem_Step_t * | p, |
| int | fVerbose ) |
Function*************************************************************
Synopsis [Stops the memory manager.]
Description []
SideEffects []
SeeAlso []
Definition at line 526 of file mem.c.

