mirror of
https://github.com/ProgramSnail/Lama.git
synced 2025-12-06 14:58:50 +00:00
improve space extension
This commit is contained in:
parent
dde29143db
commit
1abae31bdf
1 changed files with 3 additions and 3 deletions
|
|
@ -654,7 +654,7 @@ static void * gc (size_t size) {
|
||||||
exit (1);
|
exit (1);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (current + size >= to_space.end) {
|
while (current + size >= to_space.end) {
|
||||||
#ifdef DEBUG_PRINT
|
#ifdef DEBUG_PRINT
|
||||||
printf ("gc pre-extend_spaces : %x %x %x \n", current, size, to_space.end);
|
printf ("gc pre-extend_spaces : %x %x %x \n", current, size, to_space.end);
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -662,9 +662,9 @@ static void * gc (size_t size) {
|
||||||
#ifdef DEBUG_PRINT
|
#ifdef DEBUG_PRINT
|
||||||
printf ("gc post-extend_spaces: %x %x %x \n", current, size, to_space.end);
|
printf ("gc post-extend_spaces: %x %x %x \n", current, size, to_space.end);
|
||||||
#endif
|
#endif
|
||||||
|
}
|
||||||
assert (IN_PASSIVE_SPACE(current));
|
assert (IN_PASSIVE_SPACE(current));
|
||||||
assert (current + size < to_space.end);
|
assert (current + size < to_space.end);
|
||||||
}
|
|
||||||
|
|
||||||
gc_swap_spaces ();
|
gc_swap_spaces ();
|
||||||
from_space.current = current + size;
|
from_space.current = current + size;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue