summaryrefslogtreecommitdiff
path: root/libguile/struct.c
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2012-02-05 15:55:09 +0100
committerAndy Wingo <wingo@pobox.com>2012-02-05 15:55:37 +0100
commit817307ccac5027fd784798bbbf6ffb52e0a5d751 (patch)
tree2ff2e6316b36d709e442f52255c92ec5262ebb6e /libguile/struct.c
parent13fb25ba0c24a9e7732d2c32dbc882c7d462bce9 (diff)
downloadguile-817307ccac5027fd784798bbbf6ffb52e0a5d751.tar.gz
Fix --enable-debug-malloc
* libguile/gc-malloc.c (do_realloc, do_calloc, do_gc_malloc) (do_gc_malloc_atomic, do_gc_realloc, do_gc_free): Wrap the allocators in helper methods. The non-GC allocators call scm_gc_register_allocation, and the GC allocators ensure that gc_malloc returns a nonzero value. (scm_realloc, scm_calloc): Allow NULL return for malloc(0). It is permitted by POSIX. Don't wrap in a SCM_SYSCALL; the only possible errno is ENOMEM. (scm_gc_malloc_pointerless, scm_gc_malloc, scm_gc_calloc): (scm_gc_realloc, scm_gc_free, scm_gc_strndump): Use the wrappers. Don't call the debug-malloc registrations and deregistrations, as it is neither mandatory nor advised to call scm_gc_free. Fixes compilation with debug-malloc. (scm_must_free): Don't scm_malloc_unregister.
Diffstat (limited to 'libguile/struct.c')
0 files changed, 0 insertions, 0 deletions