Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!samsung!uunet!comp.vuw.ac.nz!cavebbs!frank From: frank@cavebbs.gen.nz (Frank van der Hulst) Newsgroups: comp.lang.c Subject: Re: Does TC's farrealloc have a bug? Message-ID: <1991Jun23.014657.7521@cavebbs.gen.nz> Date: 23 Jun 91 01:46:57 GMT References: <6574@ns-mx.uiowa.edu> <1991Jun21.152700.25820@doc.ic.ac.uk> <1991Jun21.124738.5383@hellgate.utah.edu> Organization: The Cave MegaBBS, Public Access Usenet, Wellington, NZ Lines: 21 >In article <1991Jun21.152700.25820@doc.ic.ac.uk> pj@doc.ic.ac.uk (Paul Jarvis) writes: >> >>I have recently had a report of problems using huge far pointers and allocating >>and freeing memory. The problem appeared to be that the free process did not >>work hence memory got lost. The compiler was Turbo C (sorry version not known). One bug I've managed to prove relates to (at least) TC v2.01 and huge pointers. If you have an array of structures which is more than 64K, then the pointer arithmetic will be wrong for the array element (structure) which overlap the 64K boundary. This may cause subsequent problems with farfree(), farrealloc(), and (I guess) anything else using the far heap. Frank. -- Take a walk on the wild side, and I don't mean the Milford Track. Kayaking: The art of appearing to want to go where your boat is taking you.