Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.1 6/24/83 (MC840302); site mcvax.UUCP
Path: utzoo!watmath!clyde!floyd!harpo!decvax!mcvax!guido
From: guido@mcvax.UUCP (Guido van Rossum)
Newsgroups: net.bugs.4bsd,net.unix-wizards
Subject: Re: bug in realloc in 4.2 version of malloc (uninteresting comments)
Message-ID: <5731@mcvax.UUCP>
Date: Mon, 5-Mar-84 10:27:40 EST
Article-I.D.: mcvax.5731
Posted: Mon Mar  5 10:27:40 1984
Date-Received: Wed, 7-Mar-84 08:09:34 EST
References: <2327@allegra.UUCP>
Organization: CWI, Amsterdam
Lines: 12

I generally agree with your evaluation of 4.2 malloc.  However I think it is
not fair to blame the author for the fact that realloc_srchlen is
initialized to 4 rather than -1.  After all it is a global variable, so
those programs which use memory compaction (there can't be many, given the
obscure description of this feature in the V7 manual) can be fixed quite
easily to set it to -1 at initialization time.  Of course, the length of
your article probably reflects the time you spent to find the bug --
maybe you had been better off when realloc returned (char*)NULL if it can't
find the original pointer.  This should be a minor change.

Guido (oh, and change the manual page, too) van Rossum, CWI, Amsterdam
	guido @ mcvax