[m-rev.] for review: increase default detstack size
Mark Brown
mark at cs.mu.OZ.AU
Wed Aug 31 01:49:38 AEST 2005
Hi,
Bootchecking fails on saturn in grade asm_fast.gc.tr.debug because of a
detstack overflow in stage3. One solution is to double the default size,
which is not unreasonable since 64-bit machines are becoming more common.
Is this a good idea? It will come with a performance penalty (see the
comments in runtime/mercury_wrapper.c). This is what the diff below does.
One alternative is to leave the default as is, but specify a higher limit
in the bootcheck script when in a debug grade. Another alternative is for
the default size to be specified in words rather than kB, so that the size
will naturally be doubled on 64-bit machines. Any comments?
Cheers,
Mark.
Estimated hours taken: 0.1
Branches: main
runtime/mercury_wrapper.c:
Double the default detstack size. We run out of detstack when
bootchecking in grade asm_fast.gc.tr.debug on x86_64.
doc/user_guide.texi:
Update the documentation corresponding to this.
Index: doc/user_guide.texi
===================================================================
RCS file: /home/mercury1/repository/mercury/doc/user_guide.texi,v
retrieving revision 1.451
diff -u -r1.451 user_guide.texi
--- doc/user_guide.texi 24 Aug 2005 09:07:09 -0000 1.451
+++ doc/user_guide.texi 30 Aug 2005 15:05:49 -0000
@@ -421,7 +421,7 @@
@c XXX FIXME This is wrong for the case when --high-level-code is enabled.
The det stack and the nondet stack
are allocated fixed sizes at program start-up.
-The default size is 4096k for the det stack and 128k for the nondet stack,
+The default size is 8192k for the det stack and 128k for the nondet stack,
but these can be overridden with the
@samp{--detstack-size} and @samp{--nondetstack-size} options,
@findex --detstack-size
Index: runtime/mercury_wrapper.c
===================================================================
RCS file: /home/mercury1/repository/mercury/runtime/mercury_wrapper.c,v
retrieving revision 1.151
diff -u -r1.151 mercury_wrapper.c
--- runtime/mercury_wrapper.c 29 Aug 2005 15:44:28 -0000 1.151
+++ runtime/mercury_wrapper.c 30 Aug 2005 15:12:41 -0000
@@ -85,7 +85,7 @@
#else
size_t MR_heap_size = 32768; /* 32 Mb */
#endif
-size_t MR_detstack_size = 4096;
+size_t MR_detstack_size = 8192;
size_t MR_nondstack_size = 256;
size_t MR_solutions_heap_size = 1024;
size_t MR_global_heap_size = 1024;
--------------------------------------------------------------------------
mercury-reviews mailing list
post: mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------
More information about the reviews
mailing list