diff --git a/runtime.c b/runtime.c
index a3298810..4c57b5c5 100644
a
|
b
|
C_regparm void C_fcall C_rereclaim2(C_uword size, int relative_resize) |
3798 | 3798 | */ |
3799 | 3799 | if(size > heap_size && size - heap_size < stack_size * 2) |
3800 | 3800 | size = heap_size + stack_size * 2; |
3801 | | |
| 3801 | |
| 3802 | /* |
| 3803 | * The heap has grown but we've already hit the maximal size with the current |
| 3804 | * heap, we can't do anything else but panic. |
| 3805 | */ |
| 3806 | if(size >= heap_size && heap_size >= C_maximal_heap_size) |
| 3807 | panic(C_text("out of memory - heap has reached its maximum size")); |
| 3808 | |
3802 | 3809 | if(size > C_maximal_heap_size) size = C_maximal_heap_size; |
3803 | 3810 | |
3804 | 3811 | if(debug_mode) { |