From 04b08da9af0c450d645ab7389d1467308cfc2db8 Mon Sep 17 00:00:00 2001 From: Michael Stapelberg Date: Mon, 4 Mar 2013 21:27:36 +0100 Subject: Imported Upstream version 1.1~hg20130304 --- src/pkg/runtime/stack.h | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'src/pkg/runtime/stack.h') diff --git a/src/pkg/runtime/stack.h b/src/pkg/runtime/stack.h index d42385d6c..06b0c568c 100644 --- a/src/pkg/runtime/stack.h +++ b/src/pkg/runtime/stack.h @@ -55,13 +55,19 @@ functions to make sure that this limit cannot be violated. enum { // StackSystem is a number of additional bytes to add // to each stack below the usual guard area for OS-specific - // purposes like signal handling. Used on Windows because - // it does not use a separate stack. + // purposes like signal handling. Used on Windows and on + // Plan 9 because they do not use a separate stack. #ifdef GOOS_windows StackSystem = 512 * sizeof(uintptr), +#else +#ifdef GOOS_plan9 + // The size of the note handler frame varies among architectures, + // but 512 bytes should be enough for every implementation. + StackSystem = 512, #else StackSystem = 0, -#endif +#endif // Plan 9 +#endif // Windows // The amount of extra stack to allocate beyond the size // needed for the single frame that triggered the split. -- cgit v1.2.3