From f17edf9829e88090445a7f8b3e74979ca08ecfa0 Mon Sep 17 00:00:00 2001 From: Patrick Walton Date: Wed, 17 Aug 2011 18:14:47 -0700 Subject: rustc: Use obstacks in lieu of dynamically-allocated frames only when the frame is actually dynamically-sized --- src/rt/rust_upcall.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/rt/rust_upcall.cpp') diff --git a/src/rt/rust_upcall.cpp b/src/rt/rust_upcall.cpp index d04de59a4df..ac99f501f25 100644 --- a/src/rt/rust_upcall.cpp +++ b/src/rt/rust_upcall.cpp @@ -430,7 +430,7 @@ upcall_dynastack_mark(rust_task *task) { /** Allocates space in the dynamic stack and returns it. */ extern "C" CDECL void * upcall_dynastack_alloc(rust_task *task, size_t sz) { - return task->dynastack.alloc(sz); + return sz ? task->dynastack.alloc(sz) : NULL; } /** Frees space in the dynamic stack. */ -- cgit 1.4.1-3-g733a5