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)
125 lbm_uint *bitmap, lbm_uint bitmap_size);
190 lbm_int lbm_memory_address_to_ix(lbm_uint *ptr);
void * lbm_malloc(size_t size)
int lbm_memory_shrink(lbm_uint *ptr, lbm_uint n)
void * lbm_malloc_reserve(size_t size)
lbm_uint lbm_memory_get_reserve(void)
int lbm_memory_init(lbm_uint *data, lbm_uint data_size, lbm_uint *bitmap, lbm_uint bitmap_size)
lbm_uint * lbm_memory_allocate(lbm_uint num_words)
lbm_uint lbm_memory_num_words(void)
lbm_uint lbm_memory_num_free(void)
void lbm_memory_set_reserve(lbm_uint num_words)
int lbm_memory_free(lbm_uint *ptr)
int lbm_memory_ptr_inside(lbm_uint *ptr)
lbm_uint lbm_memory_longest_free(void)