4.0 patch: Implement gij -Xss option
Krister Walfridsson
cato@df.lth.se
Fri Dec 30 22:22:00 GMT 2005
On Thu, 17 Nov 2005, Bryce McKinlay wrote:
> 2005-11-17 Bryce McKinlay <mckinlay@redhat.com>
>
> 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.
NetBSD does not define PTHREAD_STACK_MIN, so this breaks bootstrap.
Something along the line of the patch below need to be committed on
the trunk, gcc-4_0-branch, and gcc-4_1-branch.
The patch has been bootstrapped and regtested on i386-unknown-netbsdelf2.1
for the tree branches.
/Krister
2005-12-30 Krister Walfridsson <cato@df.lth.se>
* posix-threads.cc (_Jv_InitThreads): #ifdef PTHREAD_STACK_MIN
Index: posix-threads.cc
===================================================================
--- posix-threads.cc (revision 109109)
+++ posix-threads.cc (working copy)
@@ -338,8 +338,10 @@
// Bigger default on 64-bit systems.
min_ss *= 2;
+#ifdef PTHREAD_STACK_MIN
if (min_ss < PTHREAD_STACK_MIN)
min_ss = PTHREAD_STACK_MIN;
+#endif
if (gcj::stack_size > 0 && gcj::stack_size < min_ss)
gcj::stack_size = min_ss;
More information about the Java-patches
mailing list