This chapter describes the global functions and macros you use to perform memory management. NSPR provides heap-based memory management functions that map to the familiar
NSPR has its own heap, and these functions act on that heap. Libraries built on top of NSPR, such as the Netscape security libraries, use these functions to allocate and free memory. If you are allocating memory for use by such libraries or freeing memory that was allocated by such libraries, you must use these NSPR functions rather than the libc equivalents.
Memory allocation functions are:
PR_Free() have the same signatures as their libc equivalents
free(), and have the same semantics. (Note that the argument type
size_t is replaced by
PRUint32.) Memory allocated by
PR_Realloc() must be freed by