next up previous contents index
Next: 19.2 Debugging versions of Up: 19.1 Introduction Previous: 19.1.2 Memdebug Library Internals

19.1.3 External Dependencies

The memdebug library uses several functions, and one global variable that it does not define. Outside of memory allocation primitives, it uses panic for flagging internal consistency failures, and memset for wiping swaths of memory. The default implementation of memdebug_printf requires vprintf.

For memory allocation primitives, the memdebug library depends on lmm_alloc_aligned and lmm_free from the LMM library (see Section 15). The same LMM pool, malloc_lmm, used by the default implementations of malloc, et al is used by the memdebug library. Additionally, calls to mem_lock and mem_unlock are made around accesses to malloc_lmm. A call to morecore is made when any allocation function returns 0. (morecore, mem_lock, mem_unlock, and the malloc_lmm are described in more detail in the Memory Allocation section of the Minimal C Library chapter, Section 9.5.)



University of Utah Flux Research Group