summaryrefslogtreecommitdiff
path: root/mmm.c
blob: 6b271e89eb6ce6489e625bb96c1f06feeef502b5 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#include "mmm.h"

#ifdef MMM_PLAIN
#endif



/*Special choice option*/
#ifdef MMM_RECORD

void* mmm_malloc(size_t size, const char *fname, int line )
{
	void *ret=NULL;
	ret = malloc( size );
	printf("alloc,0x%8p,%zu,%s,%d\n",(void *)ret,size,fname,line);
	return ret;
}


void mmm_free( void *ptr, const char *fname, int line )
{
	printf("free,0x%8p,%s,%d\n",(void *)ptr,fname,line);
	free( ptr );
}

#endif