[m-rev.] for review: fix misleading io__report_stats

Fergus Henderson fjh at cs.mu.OZ.AU
Thu Apr 26 19:57:56 AEST 2001


On 26-Apr-2001, Zoltan Somogyi <zs at cs.mu.OZ.AU> wrote:
> Fix a bug: in .gc grades, io__report_stats reported the size of the stacks
> (and possibly other zones) allocated at program startup as if they were cells
> allocated on the heap.
> 
> runtime/mercury_wrapper.[ch]:
> 	Add a global variable that records the size of the zones allocated
> 	via Boehm gc since the last call to io__report_stats.
> 
> runtime/mercury_memory_zones.c:
> 	Increment this global variable as appropriate.
> 
> library/benchmarking.m:
> 	Subtract the global variable from the value reported for heap cell
> 	allocations, then zero it to prevent double counting.

This fix doesn't work, I'm pretty sure.  E.g. it will do the wrong thing for

	main -->
		io__report_stats,
		io__report_stats.

and for

	main -->
		gc__garbage_collect,
		io__report_stats.

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
                                    |  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