296 |
highest_cell = SCM_MAX (highest_cell, seg->bounds[1]); |
highest_cell = SCM_MAX (highest_cell, seg->bounds[1]); |
297 |
} |
} |
298 |
|
|
299 |
|
|
300 |
{ |
{ |
301 |
int i = 0; |
int i = 0; |
302 |
int j = 0; |
int j = 0; |
304 |
while (i < scm_i_heap_segment_table_size |
while (i < scm_i_heap_segment_table_size |
305 |
&& scm_i_heap_segment_table[i]->bounds[0] <= seg->bounds[0]) |
&& scm_i_heap_segment_table[i]->bounds[0] <= seg->bounds[0]) |
306 |
i++; |
i++; |
307 |
|
|
308 |
|
/* |
309 |
|
We insert a new entry; if that happens to be before the |
310 |
|
"current" segment of a freelist, we must move the freelist index |
311 |
|
as well. |
312 |
|
*/ |
313 |
|
if (scm_i_master_freelist.heap_segment_idx >= i) |
314 |
|
scm_i_master_freelist.heap_segment_idx ++; |
315 |
|
if (scm_i_master_freelist2.heap_segment_idx >= i) |
316 |
|
scm_i_master_freelist2.heap_segment_idx ++; |
317 |
|
|
318 |
for (j = scm_i_heap_segment_table_size; j > i; --j) |
for (j = scm_i_heap_segment_table_size; j > i; --j) |
319 |
scm_i_heap_segment_table[j] = scm_i_heap_segment_table[j - 1]; |
scm_i_heap_segment_table[j] = scm_i_heap_segment_table[j - 1]; |
320 |
|
|