-
Notifications
You must be signed in to change notification settings - Fork 9
/
mm.h
25 lines (18 loc) · 640 Bytes
/
mm.h
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
#include <stdio.h>
#ifdef DRIVER
/* declare functions for driver tests */
extern void *mm_malloc (size_t size);
extern void mm_free (void *ptr);
extern void *mm_realloc(void *ptr, size_t size);
extern void *mm_calloc (size_t nmemb, size_t size);
#else
/* declare functions for interpositioning */
extern void *malloc (size_t size);
extern void free (void *ptr);
extern void *realloc(void *ptr, size_t size);
extern void *calloc (size_t nmemb, size_t size);
#endif
extern int mm_init(void);
/* This is largely for debugging. You can do what you want with the
verbose flag; we don't care. */
extern void mm_checkheap(int verbose);