mirror of
https://github.com/ProgramSnail/Lama.git
synced 2025-12-06 06:48:48 +00:00
remove dead code and unnecessary comment
This commit is contained in:
parent
149984f5c0
commit
88336073af
1 changed files with 4 additions and 3 deletions
|
|
@ -1163,6 +1163,7 @@ extern void __gc_root_scan_stack ();
|
||||||
/* Mark-and-copy */
|
/* Mark-and-copy */
|
||||||
/* ======================================== */
|
/* ======================================== */
|
||||||
|
|
||||||
|
// static size_t SPACE_SIZE = 32;
|
||||||
static size_t SPACE_SIZE = 32 * 1024;
|
static size_t SPACE_SIZE = 32 * 1024;
|
||||||
// static size_t SPACE_SIZE = 128;
|
// static size_t SPACE_SIZE = 128;
|
||||||
// static size_t SPACE_SIZE = 1024 * 1024;
|
// static size_t SPACE_SIZE = 1024 * 1024;
|
||||||
|
|
@ -1208,7 +1209,7 @@ static void gc_swap_spaces (void) {
|
||||||
|
|
||||||
# define IS_VALID_HEAP_POINTER(p)\
|
# define IS_VALID_HEAP_POINTER(p)\
|
||||||
(!UNBOXED(p) && \
|
(!UNBOXED(p) && \
|
||||||
from_space.begin <= p && \
|
from_space.begin <= p && \
|
||||||
from_space.end > p)
|
from_space.end > p)
|
||||||
|
|
||||||
# define IN_PASSIVE_SPACE(p) \
|
# define IN_PASSIVE_SPACE(p) \
|
||||||
|
|
@ -1386,7 +1387,7 @@ extern size_t * gc_copy (size_t *obj) {
|
||||||
}
|
}
|
||||||
|
|
||||||
extern void gc_test_and_copy_root (size_t ** root) {
|
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
|
#ifdef DEBUG_PRINT
|
||||||
printf ("gc_test_and_copy_root: root %p *root %p\n", root, *root); fflush (stdout);
|
printf ("gc_test_and_copy_root: root %p *root %p\n", root, *root); fflush (stdout);
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -1565,7 +1566,7 @@ extern void * alloc (size_t size) {
|
||||||
printf("gc END\n\n"); fflush (stdout);
|
printf("gc END\n\n"); fflush (stdout);
|
||||||
printFromSpace(); fflush (stdout);
|
printFromSpace(); fflush (stdout);
|
||||||
#endif
|
#endif
|
||||||
init_to_space (0); // new
|
init_to_space (0);
|
||||||
return gc (size);
|
return gc (size);
|
||||||
}
|
}
|
||||||
# endif
|
# endif
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue