mirror of
https://github.com/ashinn/chibi-scheme.git
synced 2025-05-20 06:09:18 +02:00
don't check tags of free blocks when debugging
This commit is contained in:
parent
10ce6a47cb
commit
c17e9b64b0
1 changed files with 5 additions and 5 deletions
10
gc.c
10
gc.c
|
@ -207,17 +207,17 @@ sexp sexp_sweep (sexp ctx, size_t *sum_freed_ptr) {
|
|||
fprintf(stderr, SEXP_BANNER("%p sweep: bad magic at %p: %p"),
|
||||
ctx, p, sexp_pointer_magic(p));
|
||||
#endif
|
||||
if ((char*)r == (char*)p) { /* this is a free block, skip it */
|
||||
p = (sexp) (((char*)p) + r->size);
|
||||
continue;
|
||||
}
|
||||
size = sexp_heap_align(sexp_allocated_bytes(ctx, p));
|
||||
#if SEXP_USE_DEBUG_GC > 1
|
||||
if (sexp_pointer_tag(p) <= 0
|
||||
|| sexp_pointer_tag(p) > sexp_context_num_types(ctx))
|
||||
fprintf(stderr, SEXP_BANNER("%p sweep: bad object at %p: tag: %d"),
|
||||
ctx, p, sexp_pointer_tag(p));
|
||||
#endif
|
||||
if ((char*)r == (char*)p) { /* this is a free block, skip it */
|
||||
p = (sexp) (((char*)p) + r->size);
|
||||
continue;
|
||||
}
|
||||
size = sexp_heap_align(sexp_allocated_bytes(ctx, p));
|
||||
#if SEXP_USE_DEBUG_GC
|
||||
if (r && ((char*)p)+size > (char*)r)
|
||||
fprintf(stderr, SEXP_BANNER("%p sweep: bad size at %p + %d > %p"),
|
||||
|
|
Loading…
Add table
Reference in a new issue