void *data; /* chunk data */
int first_free; /* no free below this */
bool immutable; /* no [de]population allowed */
- bool has_reserved; /* Indicates if chunk has reserved space
- at the beginning. Reserved chunk will
- contain reservation for static chunk.
- Dynamic chunk will contain reservation
- for static and reserved chunks. */
int start_offset; /* the overlap with the previous
region to have a page aligned
base_addr */
int cur_min_alloc = 0, cur_med_alloc = 0, cur_max_alloc = 0;
alloc_sizes = buffer;
- s_index = chunk->has_reserved ? 1 : 0;
+ s_index = (chunk->start_offset) ? 1 : 0;
/* find last allocation */
last_alloc = -1;
chunk->map[0] = 0;
chunk->map[1] = pcpu_unit_size | 1;
chunk->map_used = 1;
- chunk->has_reserved = false;
INIT_LIST_HEAD(&chunk->list);
INIT_LIST_HEAD(&chunk->map_extend_list);
schunk->map[1] = schunk->start_offset;
schunk->map[2] = (ai->static_size + schunk->free_size) | 1;
schunk->map_used = 2;
- schunk->has_reserved = true;
/* init dynamic chunk if necessary */
if (dyn_size) {
dchunk->map[1] = dchunk->start_offset;
dchunk->map[2] = (dchunk->start_offset + dchunk->free_size) | 1;
dchunk->map_used = 2;
- dchunk->has_reserved = true;
}
/* link the first chunk in */