From a4fc41c98c9c2518624b2b296992c505c5f6904f Mon Sep 17 00:00:00 2001 From: Bryce McKinlay Date: Thu, 17 Nov 2005 20:25:57 +0000 Subject: Implement -Xss. * include/jvm.h (gcj::stack_size): Declare. (_Jv_StackSize): Declare. * posix-threads.cc (_Jv_InitThreads): Validate gcj::stack_size. (_Jv_ThreadStart): Set stack size if specified. * prims.cc (gcj::stack_size): Define. (parse_memory_size): Renamed from parse_heap_size. (_Jv_SetStackSize): Parse stack size argument and set gcj::stack_size. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@107132 138bc75d-0d04-0410-961f-82ee72b054a4 --- libjava/include/jvm.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'libjava/include/jvm.h') diff --git a/libjava/include/jvm.h b/libjava/include/jvm.h index 6061300a74d..fc104d695f8 100644 --- a/libjava/include/jvm.h +++ b/libjava/include/jvm.h @@ -233,6 +233,9 @@ namespace gcj /* When true, enable the bytecode verifier and BC-ABI verification. */ extern bool verifyClasses; + + /* Thread stack size specified by the -Xss runtime argument. */ + extern size_t stack_size; } // This class handles all aspects of class preparation and linking. @@ -363,6 +366,10 @@ void _Jv_SetMaximumHeapSize (const char *arg); during thread deregistration. */ void _Jv_FreeMethodCache (); +/* Set the stack size for threads. Parses ARG, a number which can + optionally have "k" or "m" appended. */ +void _Jv_SetStackSize (const char *arg); + extern "C" void JvRunMain (jclass klass, int argc, const char **argv); void _Jv_RunMain (jclass klass, const char *name, int argc, const char **argv, bool is_jar); -- cgit v1.2.3