limit check bug

Stephen Weeks sweeks@acm.org
Wed, 13 Feb 2002 09:58:00 -0800


There was still one problem with what I sent out yesterday.  If the
program uses signals, then limit may be zero, in which case

	(limit + LIMIT_SLOP) - frontier

will underflow.  So, my new proposal is 

1. If bytesAllocated <= LIMIT_SLOP, use

	frontier <= limit

2. Otherwise

	a. If the program doesn't use signals, use

		bytesAllocated <= (limit + LIMIT_SLOP) - frontier

	b If the program uses signals, use

		frontier <= limit
		and bytesAllocated <= (limit + LIMIT_SLOP) - frontier

BTW, I will add a new field to gcState so that we have both limit and
limit + LIMIT_SLOP available.