From: "Tom Demmer" Organization: Lehrstuhl Stroemungsmechanik, RUB To: Eli Zaretskii , djgpp AT delorie DOT com Date: Thu, 30 Oct 1997 16:55:59 GMT-1 MIME-Version: 1.0 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Subject: Re: malloc Reply-to: Demmer AT LStM DOT Ruhr-Uni-Bochum DOT De Message-ID: <789617123B4@brain1.lstm.ruhr-uni-bochum.de> Precedence: bulk Eli Zaretskii wrote: > > On Thu, 30 Oct 1997, Tom Demmer wrote: > > > Starting at a blocksize of > > 100, the dl version becomes comparable or even faster than the libc > > version. Test 3 with 15000 outperforms the libc version about the > > factor 2. > > Does the break-even point occur before or after all physical memory is > used up? If the latter, then on more memory-abundant machines the > results will be different. (And 16MB is not too much by today's > standards.) Way before. I stopped at a maximum blocksize of 16k because my machine fell into paging then. So all this is with real RAM. > But is there something in libc's malloc which would prevent adding this > functionality? Not that I know. But that may not mean anything. What makes it less efficient in the BSD version might be the lack of coalescing (this is spelled wrong for sure) smaller chunks of memory. > > > and has no real effect under cwsdpmi, because it does not change the > > amount of physical available memory. > > Oh, but it *does* change the amount of *free* physical memory, right? So > when a child program is spawned, you don't have to wait for CWSDPMI to > page out some of the parent, and page it in when the child exits, right? This is basically my question. So, what does info.available_physical_pages mean? If this _is_ the free memory, than it is not given back to the OS by the DPMI host, i.e. sbrk() with a negative parameter does not increase the amount of memory available for other processes. If, OTHO free physical memory != available physical memory, then I do suffer from misunderstanding these terms and the rest of my ideas are probably nonsense ;-) > > > I don't know if this is a > > limitiation of the DPMI specs, but really making the memory available > > for other processes would be an advantage in a multitasking > > environment. > > It would be worthwhile, then, to run your tests in two different DOS > boxes on Windows simultaneously, and use some memory-tracking program to > track the Windows memory resources during the test. > As is use Windows only on the rare occasions when I really have to draw something myself, I don't have any reliable memory tracking programs. I doubt I have a working windows installation at all ;-) Ciao Tom ****************************************************************** * Thomas Demmer * Phone : +49 234 700 6434 * * Universitaetsstr. 150 * Fax : +49 234 709 4162 * * Lehrstuhl fuer Stroemungsmechanik * * * D-44780 Bochum * * ****************************************************************** * Email: demmer AT LStM DOT Ruhr-Uni-Bochum DOT De * * WWW: http://www.lstm.ruhr-uni-bochum.de/~demmer * ****************************************************************** Intuition (n): an uncanny sixth sense which tells people that they are right, whether they are or not.