The following patch fixes gc-mem.c in kaffevm for 0.9.2 so that it a) honors the -mx flag and b) tells you when it actually runs out of memory (without that it would just hang when you ran out of virtual memory - which could be caused by having a datalimit set, for instance. - That happened to me, so make sure you ulimit so that you can take advantage of your 64M + swap) - Godmar 46,47c46,47 < size_t gc_heap_allocation_size; < size_t gc_heap_limit; --- > size_t gc_heap_allocation_size = ALLOC_HEAPSIZE; > size_t gc_heap_limit = MAX_HEAPSIZE; 69,70d68 < gc_heap_allocation_size = ALLOC_HEAPSIZE; < gc_heap_limit = MAX_HEAPSIZE; 649c647,650 < ptr = sbrk(size); --- > if ((ptr = sbrk(size)) == -1) { > ptr = 0; > break; > }