#include <psMemory.h>
Collaboration diagram for psMemBlock:

N.b. sizeof(psMemBlock) must be chosen such that if ptr is a pointer returned by malloc, then ((char *)ptr + sizeof(psMemBlock)) is properly aligned for all storage types.
Definition at line 57 of file psMemory.h.
Data Fields | |
| const psU32 | startblock |
| initialised to p_psMEMMAGIC | |
| psMemBlock * | previousBlock |
| previous block in allocation list | |
| psMemBlock * | nextBlock |
| next block allocation list | |
| psFreeFunc | freeFunc |
| deallocator. If NULL, use generic deallocation. | |
| size_t | userMemorySize |
| the size of the user-portion of the memory block | |
| const psMemId | id |
| a unique ID for this allocation | |
| const pthread_t | tid |
| set from pthread_self(); | |
| const char * | file |
| set from __FILE__ in e.g. p_psAlloc | |
| const unsigned int | lineno |
| set from __LINE__ in e.g. p_psAlloc | |
| const char * | func |
| set from __func__ | |
| psReferenceCount | refCounter |
| how many times pointer is referenced | |
| bool | persistent |
| marks if this non-user persistent data like error stack, etc. | |
| const psU32 | endblock |
| initialised to p_psMEMMAGIC | |
| const psU32 psMemBlock::startblock |
1.5.1