/SPARTAN/trunk/include/mm/frame.h |
---|
52,7 → 52,7 |
struct frame { |
count_t refcount; /**< when == 0, the frame is in free list */ |
link_t link; /**< link to zone free list when refcount == 0 */ |
} __attribute__ ((packed)); |
}; |
extern spinlock_t zone_head_lock; /**< this lock protects zone_head list */ |
extern link_t zone_head; /**< list of all zones in the system */ |
/SPARTAN/trunk/include/mm/heap.h |
---|
32,6 → 32,9 |
#include <arch/types.h> |
#include <typedefs.h> |
#define malloc(size) early_malloc(size) |
#define free(ptr) early_free(ptr) |
struct chunk { |
int used; |
struct chunk *next; |
40,9 → 43,9 |
__native data[0]; |
}; |
extern void heap_init(__address heap, size_t size); |
extern void early_heap_init(__address heap, size_t size); |
extern void *malloc(size_t size); |
extern void free(void *ptr); |
extern void *early_malloc(size_t size); |
extern void early_free(void *ptr); |
#endif |