Files | |
file | Memory.c |
Memory management code. | |
file | Memory.h |
Memory management declarations. | |
Data Structures | |
struct | ANetMemoryTag |
Opaque memory tag. More... | |
Typedefs | |
typedef UInt32 | ANetMemoryTag |
Functions | |
UInt32 | IsTagValid (ANetMemoryTag tag) |
Checks if an ANetMemoryTag is valid. More... | |
ANetMemoryTag | NewMemoryBlock (UInt32 size, UInt32 flags) |
Creates a new memory block. More... | |
UInt32 | DeleteMemoryBlock (ANetMemoryTag tag) |
Deletes a memory block. More... | |
UInt32 | GetMemoryBlockSize (ANetMemoryTag tag) |
Gets the size of a memory block. More... | |
UInt32 | ResolveMemoryTag (ANetMemoryTag tag, UInt8 **ptr) |
Resolves an ANetMemoryTag . More... |
Those functions are used to create, change, delete and manage memory blocks allocated in the daemon's memory partition.
Their implementation is totoally cross-platform yet are much more flexible than what is offered by the functions offered in the ANSI C libraries.
While use of those functions is not essential, it is highly recommended. Any data stored in a memory block generated by those functions can be tracked (for leak detection), stored on hard disk and relocated transparently.
|
Definition at line 52 of file Memory.h. Referenced by ANetCloseFile(), ANetGetGlobals(), ANetGetSetFilePath(), ANetReadFile(), DeleteMemoryBlock(), GetMemoryBlockSize(), IsTagValid(), MemoryTest(), NewMemoryBlock(), and ResolveMemoryTag(). |
|
Deletes a memory block.
NewMemoryBlock() .
Definition at line 83 of file Memory.c. References ANetMemoryTag. |
|
Gets the size of a memory block.
The returned value is unexpected if
Definition at line 102 of file Memory.c. References ANetMemoryTag. |
|
Checks if an
ANetMemoryTag .
Definition at line 39 of file Memory.c. References ANetMemoryTag. |
|
Creates a new memory block.
ANetMemoryTag which can be used with other functions.
Use
Definition at line 59 of file Memory.c. References ANetMemoryTag. |
|
Resolves an
ANetMemoryTag .
Definition at line 123 of file Memory.c. References ANetMemoryTag. |