Go to the documentation of this file.
74 #ifndef _LISPBM_MEMORY_H_
75 #define _LISPBM_MEMORY_H_
85 #define LBM_MEMORY_SIZE_64BYTES_TIMES_X(X) (16*(X))
87 #define LBM_MEMORY_BITMAP_SIZE(X) (X)
89 #define LBM_MEMORY_BITMAP_SIZE(X) ((X)/2)
92 #define LBM_MEMORY_SIZE_512 LBM_MEMORY_SIZE_64BYTES_TIMES_X(8)
93 #define LBM_MEMORY_SIZE_1K LBM_MEMORY_SIZE_64BYTES_TIMES_X(16)
94 #define LBM_MEMORY_SIZE_2K LBM_MEMORY_SIZE_64BYTES_TIMES_X(32)
95 #define LBM_MEMORY_SIZE_4K LBM_MEMORY_SIZE_64BYTES_TIMES_X(64)
96 #define LBM_MEMORY_SIZE_8K LBM_MEMORY_SIZE_64BYTES_TIMES_X(128)
97 #define LBM_MEMORY_SIZE_10K LBM_MEMORY_SIZE_64BYTES_TIMES_X(160)
98 #define LBM_MEMORY_SIZE_12K LBM_MEMORY_SIZE_64BYTES_TIMES_X(192)
99 #define LBM_MEMORY_SIZE_14K LBM_MEMORY_SIZE_64BYTES_TIMES_X(224)
100 #define LBM_MEMORY_SIZE_16K LBM_MEMORY_SIZE_64BYTES_TIMES_X(256)
101 #define LBM_MEMORY_SIZE_32K LBM_MEMORY_SIZE_64BYTES_TIMES_X(512)
102 #define LBM_MEMORY_SIZE_1M LBM_MEMORY_SIZE_64BYTES_TIMES_X(16384)
104 #define LBM_MEMORY_BITMAP_SIZE_512 LBM_MEMORY_BITMAP_SIZE(8)
105 #define LBM_MEMORY_BITMAP_SIZE_1K LBM_MEMORY_BITMAP_SIZE(16)
106 #define LBM_MEMORY_BITMAP_SIZE_2K LBM_MEMORY_BITMAP_SIZE(32)
107 #define LBM_MEMORY_BITMAP_SIZE_4K LBM_MEMORY_BITMAP_SIZE(64)
108 #define LBM_MEMORY_BITMAP_SIZE_8K LBM_MEMORY_BITMAP_SIZE(128)
109 #define LBM_MEMORY_BITMAP_SIZE_10K LBM_MEMORY_BITMAP_SIZE(160)
110 #define LBM_MEMORY_BITMAP_SIZE_12K LBM_MEMORY_BITMAP_SIZE(192)
111 #define LBM_MEMORY_BITMAP_SIZE_14K LBM_MEMORY_BITMAP_SIZE(224)
112 #define LBM_MEMORY_BITMAP_SIZE_16K LBM_MEMORY_BITMAP_SIZE(256)
113 #define LBM_MEMORY_BITMAP_SIZE_32K LBM_MEMORY_BITMAP_SIZE(512)
114 #define LBM_MEMORY_BITMAP_SIZE_1M LBM_MEMORY_BITMAP_SIZE(16384)
void lbm_free(void *ptr)
Definition: lbm_memory.c:412
void * lbm_malloc_reserve(size_t size)
Definition: lbm_memory.c:399
lbm_int lbm_memory_address_to_ix(lbm_uint *ptr)
Definition: lbm_memory.c:112
uint32_t lbm_uint
Definition: lbm_types.h:48
void * lbm_malloc(size_t size)
Definition: lbm_memory.c:385
lbm_uint lbm_memory_num_words(void)
Definition: lbm_memory.c:159
int lbm_memory_shrink(lbm_uint *ptr, lbm_uint n)
Definition: lbm_memory.c:416
int lbm_memory_ptr_inside(lbm_uint *ptr)
Definition: lbm_memory.c:473
static lbm_uint * bitmap
Definition: lbm_memory.c:42
int lbm_memory_init(lbm_uint *data, lbm_uint data_size, lbm_uint *bitmap, lbm_uint bitmap_size)
Definition: lbm_memory.c:53
lbm_uint * lbm_memory_allocate(lbm_uint num_words)
Definition: lbm_memory.c:338
lbm_uint lbm_memory_num_free(void)
Definition: lbm_memory.c:163
int lbm_memory_free(lbm_uint *ptr)
Definition: lbm_memory.c:346
int32_t lbm_int
Definition: lbm_types.h:49
lbm_uint lbm_memory_longest_free(void)
Definition: lbm_memory.c:207
static lbm_uint bitmap_size
Definition: lbm_memory.c:45
void lbm_memory_set_reserve(lbm_uint num_words)
Definition: lbm_memory.c:96
lbm_uint lbm_memory_get_reserve(void)
Definition: lbm_memory.c:100