Path: utzoo!attcan!uunet!zaphod.mps.ohio-state.edu!usc!ucsd!ucbvax!bloom-beacon!eru!hagbard!sunic!dkuug!freja.diku.dk!njk From: njk@diku.dk (Niels J|rgen Kruse) Newsgroups: comp.lang.c Subject: Re: why is free() a void? Message-ID: <1990Oct26.134649.2195@diku.dk> Date: 26 Oct 90 13:46:49 GMT References: <1749@meaddata.meaddata.com> <212@smds.UUCP> Organization: Department Of Computer Science, University Of Copenhagen Lines: 14 rh@smds.UUCP (Richard Harter) writes: > It is easier (and faster) to put the allocation control information >in memory adjacent to the allocated block in allocators which use free >lists (bit mapped buddy-system allocators are a different matter.) >IMNSHO this is not nice. It is a source of mystery bugs. An array >overwrite in allocated memory can wipe out control information; the >consequence doesn't hit you until much later. If thre is no adjacent control information, the array overwrite will just scribble over some of the data you have in the next block. This is not a source of mystery bugs? Your program may not dump core, but the output will be slightly corrupted. Ugh. -- Niels J|rgen Kruse DIKU Graduate njk@diku.dk