diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2017-08-18 06:38:30 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2017-08-18 06:38:30 -0700 |
commit | b79bc438aadeda878eaa2a26c72129edffba4be7 (patch) | |
tree | 0b5e993bb988e49375d5d6d75549ae7e330932ac /filter.c | |
parent | 56ff4d38c78dd99873017c075861efefe5428bad (diff) | |
download | txr-b79bc438aadeda878eaa2a26c72129edffba4be7.tar.gz txr-b79bc438aadeda878eaa2a26c72129edffba4be7.tar.bz2 txr-b79bc438aadeda878eaa2a26c72129edffba4be7.zip |
Revising out-of-memory handling.
We don't want to be aborting on OOM, but throwing an
exception.
* lib.c (alloc_error_s): New symbol variable.
(oom_realloc): Global variable removed.
(oom): New static function.
(chk_malloc, chk_malloc_gc_more, chk_calloc, chk_realloc):
Call oom instead of removed oom_realloc handler.
(env): Throw alloc-error rather than error by calling oom.
(obj_init): Initialize alloc_error_s.
(init): Drop function pointer argument; do not
initialize removed oom_realloc.
* lib.h (alloc_error_s): Declared.
(oom_realloc): Declaration removed.
(init): Declaration updated.
* txr.1: Type tree diagram includes alloc-error.
Diffstat (limited to 'filter.c')
0 files changed, 0 insertions, 0 deletions