[m-rev.] diff: fix for hlc.agc test failure

Fergus Henderson fjh at cs.mu.OZ.AU
Tue Nov 18 18:49:48 AEDT 2003


Estimated hours taken: 0.5
Branches: main

runtime/mercury_memory.c:
	If MR_heap_margin_size is too big (greater than the heap size),
	then reset it to be a single page, like we do for MR_heap_zone_size.

	Otherwise we attempt a collection at every allocation, which
	takes way too long (and causes tests/hard_coded/rational_test.m to
	fail due to exceeding the 5 minute ulimit).

Workspace: /home/jupiter/fjh/ws-jupiter/mercury
Index: runtime/mercury_memory.c
===================================================================
RCS file: /home/mercury1/repository/mercury/runtime/mercury_memory.c,v
retrieving revision 1.32
diff -u -d -r1.32 mercury_memory.c
--- runtime/mercury_memory.c	18 Mar 2003 16:38:10 -0000	1.32
+++ runtime/mercury_memory.c	18 Nov 2003 07:44:14 -0000
@@ -209,6 +209,9 @@
 	if (MR_global_heap_zone_size >= MR_global_heap_size) {
 		MR_global_heap_zone_size = MR_unit;
 	}
+	if (MR_heap_margin_size >= MR_heap_size) {
+		MR_heap_margin_size = MR_unit;
+	}
 #endif
 
 	if (MR_detstack_zone_size >= MR_detstack_size) {

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
The University of Melbourne         |  of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh>  |     -- the last words of T. S. Garp.
--------------------------------------------------------------------------
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