From 45a246967246d44a8951cc43891399c26791eb2c Mon Sep 17 00:00:00 2001 From: Joel Dice Date: Sun, 20 Feb 2011 05:59:13 +0000 Subject: [PATCH] abort if allocation fails in heap.cpp's allocate --- src/heap.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/heap.cpp b/src/heap.cpp index 02e0e99a19..c2474cf653 100644 --- a/src/heap.cpp +++ b/src/heap.cpp @@ -1746,7 +1746,10 @@ tryAllocate(Context* c, unsigned size) void* allocate(Context* c, unsigned size) { - return allocate(c, size, false); + void* p = allocate(c, size, false); + expect(c->system, p); + + return p; } void