|
MALOC
0.1
|
This class provides a safe logged version of malloc and free. More...
Classes | |
| struct | sVmem |
| Contains public data members for Vmem class. More... | |
Files | |
| file | vmem.h |
Class Vmem: A safer, object-oriented, malloc/free object. | |
Typedefs | |
| typedef struct sVmem | Vmem |
| Declaration of the Vmem class as the Vmem structure. | |
Functions | |
| size_t | Vmem_bytesTotal (void) |
| Return total of all active Vmem malloc areas (current footprint) | |
| size_t | Vmem_mallocBytesTotal (void) |
| Return total of all Vmem malloc allocations. | |
| size_t | Vmem_freeBytesTotal (void) |
| Return total of all Vmem free calls. | |
| size_t | Vmem_highWaterTotal (void) |
| Return the high-water byte mark (largest footprint) | |
| size_t | Vmem_mallocAreasTotal (void) |
| Return total of all active Vmem malloc areas by groups. | |
| void | Vmem_printTotal (void) |
| Print current memory statistics for all Vmem malloc/free areas. | |
| Vmem * | Vmem_ctor (char *name) |
| Construct the dynamic memory allocation logging object. | |
| void | Vmem_dtor (Vmem **thee) |
| Destruct the dynamic memory allocation logging object. | |
| void * | Vmem_malloc (Vmem *thee, size_t num, size_t size) |
| A safe logged version of malloc. | |
| void | Vmem_free (Vmem *thee, size_t num, size_t size, void **ram) |
| A safe logged version of free. | |
| void * | Vmem_realloc (Vmem *thee, size_t num, size_t size, void **ram, size_t newNum) |
| A safe logged version of realloc (usually a bad idea to use this) | |
| size_t | Vmem_bytes (Vmem *thee) |
| Return total of all ACTIVE malloc areas used by Vmem object. | |
| size_t | Vmem_mallocBytes (Vmem *thee) |
| Return total of all mallocs performed by Vmem object. | |
| size_t | Vmem_freeBytes (Vmem *thee) |
| Return total of all frees performed by Vmem object. | |
| size_t | Vmem_highWater (Vmem *thee) |
| Return high-water malloc bytemark hit by Vmem object. | |
| size_t | Vmem_mallocAreas (Vmem *thee) |
| Return total number of individual active malloc areas. | |
| void | Vmem_print (Vmem *thee) |
| Print current memory stats associated with this Vmem object. | |
This class provides a safe logged version of malloc and free.
This class provides a safe logged version of malloc and free, with all standard routines supported with Vmem variants.
| size_t Vmem_bytes | ( | Vmem * | thee | ) |
Return total of all ACTIVE malloc areas used by Vmem object.
| thee | Pointer to the Vmem object |
| size_t Vmem_bytesTotal | ( | void | ) |
Return total of all active Vmem malloc areas (current footprint)
Construct the dynamic memory allocation logging object.
| name | Pointer to the object name |
Destruct the dynamic memory allocation logging object.
| thee | Pointer to the Vmem object |
A safe logged version of free.
| thee | Pointer to the Vmem object |
| num | number of the allocated address |
| size | size of one allocated address |
| ram | Pointer to pointer of the reallocated memory |
| size_t Vmem_freeBytes | ( | Vmem * | thee | ) |
Return total of all frees performed by Vmem object.
| thee | Pointer to the Vmem object |
| size_t Vmem_freeBytesTotal | ( | void | ) |
Return total of all Vmem free calls.
| size_t Vmem_highWater | ( | Vmem * | thee | ) |
Return high-water malloc bytemark hit by Vmem object.
| thee | Pointer to the Vmem object |
| size_t Vmem_highWaterTotal | ( | void | ) |
Return the high-water byte mark (largest footprint)
| void* Vmem_malloc | ( | Vmem * | thee, |
| size_t | num, | ||
| size_t | size | ||
| ) |
A safe logged version of malloc.
| thee | Pointer to the Vmem object |
| num | number of the allocated address |
| size | size of one allocated address |
| size_t Vmem_mallocAreas | ( | Vmem * | thee | ) |
Return total number of individual active malloc areas.
| thee | Pointer to the Vmem object |
| size_t Vmem_mallocAreasTotal | ( | void | ) |
Return total of all active Vmem malloc areas by groups.
| size_t Vmem_mallocBytes | ( | Vmem * | thee | ) |
Return total of all mallocs performed by Vmem object.
| thee | Pointer to the Vmem object |
| size_t Vmem_mallocBytesTotal | ( | void | ) |
Return total of all Vmem malloc allocations.
| void Vmem_print | ( | Vmem * | thee | ) |
Print current memory stats associated with this Vmem object.
| thee | Pointer to the Vmem object |
| void Vmem_printTotal | ( | void | ) |
Print current memory statistics for all Vmem malloc/free areas.
| void* Vmem_realloc | ( | Vmem * | thee, |
| size_t | num, | ||
| size_t | size, | ||
| void ** | ram, | ||
| size_t | newNum | ||
| ) |
A safe logged version of realloc (usually a bad idea to use this)
| thee | Pointer to the Vmem object |
| num | number of the allocated address |
| size | size of one allocated address |
| ram | Pointer to pointer of the reallocated memory |
| newNum | number of the reallocated address |
1.7.6.1