al - Audio Library Functions gDP - DP GBI Macros gdSP - General GBI Macros gSP - SP GBI Macros gt - Turbo Microcode RDP gu - Graphics Utilities Math - Math Functions nuSys - NuSystem os - N64 Operating System sp - Sprite Library Functions uh - Host to Target IO 64DD - N64 Disk Drive
|
malloc_memcheckFormat#include <malloc.h> int malloc_memcheck(struct malloc_status_st *st) Arguments
0 is returned if the function execution was normal. In case of any value other than 0, the contents of the malloc_status_st structure are suspect and probably incorrect. For example, if 0 is returned, the size of the entire memory allocation area is recorded in the specified malloc_status_st structure. However, if the size of the entire memory allocation area is reported as 0 in the malloc_status_st structure, then the malloc_status_st contents are incorrect, so the function returns -1 instead of 0. What This Function Does It checks the memory allocation area to see if its condition is normal or abnormal, and acquires information on the used and unused portions of the memory allocation area. Following are the elements of the malloc_status_st structure: struct malloc_status_st { int alMemsize; /* size of entire memory area */ int useMemsize; /* memory size used */ int useMaxMemSize /* maximum memory size used */ int useMinMemSize /* minimum memory size used */ int freeMemSize; /* free memory size */ int freeMaxMemSize; /* minimum free memory size */ int freeMinMemSize /* maximum free memory size */ };Note This standard function comes with NuSystem.
|