next up previous contents index
Next: 19.3 Additional Debugging Utilities Up: 19 Memory Debugging Utilities: Previous: 19.1.3 External Dependencies

19.2 Debugging versions of standard routines

The functions listed below are defined as macros in the header file oskit/memdebug.h, they are also defined as simple wrappers in the library. The macro versions provide the library with file and line number information.

They are drop-in replacements for the allocation functions described in Section 9.5.

malloc:
void *malloc(size_t size);
realloc:
void *realloc(void *buf, size_t new_size);
calloc:
void *calloc(size_t nelt, size_t elt_size);
memalign:
void *memalign(size_t alignment, size_t size);
free:
void free(void *buf);
smalloc:
void *smalloc(size_t size);
smemalign:
void *smemalign(size_t alignment, size_t size);
sfree:
void sfree(void *buf, size_t size);



University of Utah Flux Research Group