1 /* Defines interfaces for the applications and exports function calls that
2 the applications should use instead of the standard ones. */
7 #include "instrument.h"
14 void *ourcalloc(size_t nmemb, size_t size) {
15 void *oc=calloc(nmemb,size);
16 memmap->allocate(oc,size*nmemb);
20 void *ourmalloc(size_t size) {
21 void *oc=malloc(size);
22 memmap->allocate(oc,size);
26 void ourfree(void *ptr) {
27 memmap->deallocate(ptr);
31 void *ourrealloc(void *ptr, size_t size) {
32 void *orr=realloc(ptr,size);
34 memmap->deallocate(ptr);
40 memmap->deallocate(ptr);
41 memmap->allocate(ptr,size);
44 void alloc(void *ptr,int size) {
45 memmap->allocate(ptr,size);
48 void dealloc(void *ptr) {
49 memmap->deallocate(ptr);