blob: 2af49cb6776469256ab3f9aa16dcbcd44b724387 (
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
|
#ifndef MEM_H_
#define MEM_H_
#include "arch.h"
#include <stddef.h>
/* allocates memory on the head, which is stored in sram2 */
void* kalloc(size_t n);
/* Frees the memory allocated by kalloc. */
void kfree(void* mem);
#ifdef FOR_TESTING
void* debug_kalloc_get_next_ptr(void* ptr);
void* debug_kalloc_get_prev_ptr(void* ptr);
int debug_kalloc_assert_consistency(char* error, size_t len);
void debug_print_blocks();
#endif
#endif
|