-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmm.h
More file actions
25 lines (18 loc) · 622 Bytes
/
mm.h
File metadata and controls
25 lines (18 loc) · 622 Bytes
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>
#include <stdbool.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 bool mm_init(void);
/* This is for debugging. Returns false if error encountered */
extern bool mm_checkheap(int lineno);