-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmm.h
More file actions
34 lines (29 loc) · 986 Bytes
/
mm.h
File metadata and controls
34 lines (29 loc) · 986 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
26
27
28
29
30
31
32
33
#include <stdio.h>
/*********************************************************
* Records the extent of each block's payload
* for evaluate the validity of your allocator
* DON'T MODIFY THIS STRUCT.
********************************************************/
typedef struct range_t {
char *lo; /* low payload address */
char *hi; /* high payload address */
struct range_t *next; /* next list element */
} range_t;
/*
* Function lists which student should implement.
*/
extern int mm_init (range_t **ranges);
extern void *mm_malloc (size_t size);
extern void mm_free (void *ptr);
extern void mm_exit (void);
extern void *mm_realloc(void *ptr, size_t size);
/*
* Students work in teams of one. Teams enter their
* personal name and student ID in a struct of this
* type in their mm.c file.
*/
typedef struct {
char *name; /* full name of first member */
char *id; /* student ID of first member */
} team_t;
extern team_t team;