From afc6928ad9f7ac251ef42998ff51ae94b97924a2 Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Tue, 25 Jan 2011 16:35:36 -0500 Subject: runtime: prefer fixed stack allocator over general memory allocator * move stack constants from proc.c to runtime.h * make memclr take uintptr length R=r CC=golang-dev https://golang.org/cl/3985046 --- src/pkg/runtime/runtime.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/pkg/runtime/runtime.c') diff --git a/src/pkg/runtime/runtime.c b/src/pkg/runtime/runtime.c index 8d3675070c..ec4593f5ec 100644 --- a/src/pkg/runtime/runtime.c +++ b/src/pkg/runtime/runtime.c @@ -84,6 +84,10 @@ runtime·panicstring(int8 *s) { Eface err; + if(m->gcing) { + runtime·printf("panic: %s\n", s); + runtime·throw("panic during gc"); + } runtime·newErrorString(runtime·gostringnocopy((byte*)s), &err); runtime·panic(err); } -- cgit v1.3-5-g9baa