Ticket #1257: gc.patch

File gc.patch, 671 bytes (added by LemonBoy, 7 years ago)
  • runtime.c

    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) 
    37983798   */
    37993799  if(size > heap_size && size - heap_size < stack_size * 2)
    38003800    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
    38023809  if(size > C_maximal_heap_size) size = C_maximal_heap_size;
    38033810
    38043811  if(debug_mode) {