Merged with runtime

This commit is contained in:
Dmitry Boulytchev 2020-01-20 03:49:20 +03:00
commit fb9f6f4509

View file

@ -1163,7 +1163,8 @@ extern void __gc_root_scan_stack ();
/* Mark-and-copy */
/* ======================================== */
static size_t SPACE_SIZE = 32 * 10240;
// static size_t SPACE_SIZE = 32;
static size_t SPACE_SIZE = 32 * 1024;
// static size_t SPACE_SIZE = 128;
// static size_t SPACE_SIZE = 1024 * 1024;
@ -1386,7 +1387,7 @@ extern size_t * gc_copy (size_t *obj) {
}
extern void gc_test_and_copy_root (size_t ** root) {
if (IS_VALID_HEAP_POINTER(*root) && *root != current && *root != from_space.current && *root != to_space.current ) {
if (IS_VALID_HEAP_POINTER(*root)) {
#ifdef DEBUG_PRINT
printf ("gc_test_and_copy_root: root %p *root %p\n", root, *root); fflush (stdout);
#endif
@ -1565,7 +1566,7 @@ extern void * alloc (size_t size) {
printf("gc END\n\n"); fflush (stdout);
printFromSpace(); fflush (stdout);
#endif
init_to_space (0); // new
init_to_space (0);
return gc (size);
}
# endif