mirror of
https://github.com/ashinn/chibi-scheme.git
synced 2025-05-19 05:39:18 +02:00
Previous checkin incomplete - fixed omissions
This commit is contained in:
parent
948070eedc
commit
bc82f836a3
2 changed files with 4 additions and 2 deletions
1
chibi-gdb
Executable file
1
chibi-gdb
Executable file
|
@ -0,0 +1 @@
|
||||||
|
LD_LIBRARY_PATH=.: DYLD_LIBRARY_PATH=.: CHIBI_MODULE_PATH=lib gdb --args ./chibi-scheme "$@"
|
|
@ -279,7 +279,7 @@ static int heaps_compar(const void* v1, const void* v2) {
|
||||||
sexp_heap h1 = *((sexp_heap*)v1);
|
sexp_heap h1 = *((sexp_heap*)v1);
|
||||||
sexp_heap h2 = *((sexp_heap*)v2);
|
sexp_heap h2 = *((sexp_heap*)v2);
|
||||||
return
|
return
|
||||||
(h1 < h1) ? -1 :
|
(h1 < h2) ? -1 :
|
||||||
(h1 > h2) ? 1 : 0;
|
(h1 > h2) ? 1 : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -315,6 +315,7 @@ sexp sexp_gc_heap_pack(sexp ctx_src, sexp_uint_t heap_free_size) {
|
||||||
res = sexp_global(ctx_src, SEXP_G_OOM_ERROR);
|
res = sexp_global(ctx_src, SEXP_G_OOM_ERROR);
|
||||||
goto done; }
|
goto done; }
|
||||||
sexp_heap h = sexp_context_heap(ctx_src);
|
sexp_heap h = sexp_context_heap(ctx_src);
|
||||||
|
for (i = 0; h; i++, h=h->next) { heaps[i] = h; }
|
||||||
qsort(heaps, state.heaps_count, sizeof(sexp_heap), heaps_compar);
|
qsort(heaps, state.heaps_count, sizeof(sexp_heap), heaps_compar);
|
||||||
|
|
||||||
/* 4. Pack the sexps into the new heap */
|
/* 4. Pack the sexps into the new heap */
|
||||||
|
@ -415,7 +416,7 @@ sexp sexp_save_image (sexp ctx_in, const char* filename) {
|
||||||
done:
|
done:
|
||||||
if (fp) fclose(fp);
|
if (fp) fclose(fp);
|
||||||
if (heap) sexp_free_heap(heap);
|
if (heap) sexp_free_heap(heap);
|
||||||
//if (res != SEXP_TRUE) res = sexp_user_exception(ctx_in, NULL, gc_heap_err_str, NULL);
|
if (res != SEXP_TRUE) res = sexp_user_exception(ctx_in, NULL, gc_heap_err_str, NULL);
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue