Initial revision
[pintos-anon] / src / threads / palloc.h
1 #ifndef HEADER_PALLOC_H
2 #define HEADER_PALLOC_H 1
3
4 /* Page allocator.  Hands out memory in page-size chunks.
5    See malloc.h for an allocator that hands out smaller
6    chunks. */
7
8 #include <stdint.h>
9
10 enum palloc_flags
11   {
12     PAL_ASSERT = 001,           /* Panic on failure. */
13     PAL_ZERO = 002              /* Zero page contents. */
14   };
15
16 void palloc_init (uint8_t *start, uint8_t *end);
17 void *palloc_get (enum palloc_flags);
18 void palloc_free (void *);
19
20 #endif /* palloc.h */