Handle code heap exhaustion with a critical error, instead of sig11 + corrupt image
parent
8249adc3f6
commit
dc8f6d703a
|
@ -11,7 +11,6 @@
|
||||||
]
|
]
|
||||||
- prettier printing of hashtable literals, alists, cond, ...
|
- prettier printing of hashtable literals, alists, cond, ...
|
||||||
- alien-indirect
|
- alien-indirect
|
||||||
- handle code heap exhaustion with a critical error
|
|
||||||
- more compact relocation info
|
- more compact relocation info
|
||||||
- problem if major gc happens during relocation
|
- problem if major gc happens during relocation
|
||||||
- in fact relocation should not cons at all
|
- in fact relocation should not cons at all
|
||||||
|
|
|
@ -225,6 +225,12 @@ CELL add_compiled_block(CELL code_format, F_VECTOR *code,
|
||||||
CELL literal_length = untag_fixnum_fast(literals->top) * CELLS;
|
CELL literal_length = untag_fixnum_fast(literals->top) * CELLS;
|
||||||
CELL words_length = untag_fixnum_fast(words->top) * CELLS;
|
CELL words_length = untag_fixnum_fast(words->top) * CELLS;
|
||||||
|
|
||||||
|
CELL total_length = sizeof(F_COMPILED) + code_length + rel_length
|
||||||
|
+ literal_length + words_length;
|
||||||
|
|
||||||
|
if(compiling.here + total_length >= compiling.limit)
|
||||||
|
critical_error("Code heap exhausted",compiling.limit);
|
||||||
|
|
||||||
/* compiled header */
|
/* compiled header */
|
||||||
F_COMPILED header;
|
F_COMPILED header;
|
||||||
header.code_length = code_length;
|
header.code_length = code_length;
|
||||||
|
|
Loading…
Reference in New Issue