-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathuapi_mm.h
More file actions
35 lines (23 loc) · 692 Bytes
/
uapi_mm.h
File metadata and controls
35 lines (23 loc) · 692 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
34
#ifndef __UAPI_MM__
#define __UAPI_MM__
#include <stdint.h>
/* alloc for the application */
void *
xcalloc(char *struct_name, int units);
void xfree(void *ptr);
#define XCALLOC(units, struct_name) \
xcalloc(#struct_name, units)
#define XFREE(ptr) \
(xfree(ptr))
/* Initialization Function */
void
mm_init();
/* Registration function */
void
mm_instantiate_new_page_family(char *struct_name, uint32_t struct_size);
#define MM_REG_STRUCT(struct_name) \
(mm_instantiate_new_page_family(#struct_name, sizeof(struct_name)))
void mm_print_memory_usage(char *struct_name);
void mm_print_registered_page_families();
void mm_print_block_usage();
#endif /* __UAPI_MM__ */