| | |
| | | #define MM_HDR_H /* Prevent accidental double inclusion */ |
| | | |
| | | #include <usg_common.h> |
| | | |
| | | #include "usg_typedef.h" |
| | | #include <sys/sem.h> |
| | | #include <sys/shm.h> |
| | | #define MAX_HEAP (512*(1<<20)) /* 20 MB */ |
| | | /* Hard-coded keys for IPC objects */ |
| | | #include "hashtable.h" |
| | | |
| | | #define SHM_KEY 0x1234 /* Key for shared memory segment */ |
| | | #define SHM_MUTEX_KEY 0x8800 |
| | | extern bool mm_init(size_t heap_size); |
| | | extern bool mm_destroy(void); |
| | | |
| | | #define OBJ_PERMS (S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP) |
| | | |
| | | extern bool mm_init(size_t offset, void **addr); |
| | | extern void mm_destroy(void); |
| | | extern void *mm_malloc (size_t size); |
| | | extern void mm_free (void *ptr); |
| | | extern void *mm_realloc(void *ptr, size_t size); |
| | | extern hashtable_t * mm_get_hashtable(); |
| | | |
| | | extern int mm_checkheap(int verbose); |
| | | // extern int mm_checkheap(int verbose); |
| | | |
| | | extern void *get_mm_start_brk(); |
| | | extern size_t get_mm_max_size(); |
| | | // extern void *get_mm_start_brk(); |
| | | // extern size_t get_mm_max_size(); |
| | | #endif |