delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/11/02/07:23:40

Date: Sun, 2 Nov 1997 14:18:40 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: John Machin <sjmachin AT lexicon DOT net DOT au>
cc: djgpp AT delorie DOT com, "Salvador Eduardo Tropea (SET)" <salvador AT inti DOT edu DOT ar>
Subject: Re: malloc()
In-Reply-To: <199710311119.WAA10318@mona.lexicon.net.au>
Message-ID: <Pine.SUN.3.91.971102141823.11098G-100000@is>
MIME-Version: 1.0

On Fri, 31 Oct 1997, John Machin wrote:

> > Could you please write a test program along these lines, or find such
> > a program written by somebody else?  It would be interesting to compare 
> > the two malloc's with such a program.  Thanks.
> > 
> OK, I've been sucked in now :-)

Welcome aboard ;-).

> One thing we would need to agree on is how to measure wastage.

The best measure I can think of is to see when a given amount of
memory is exhausted and paging begins.  That is, after all, what DJGPP
users want to avoid at all costs, at least on MS-DOS (Windows is more
complicated).  The issue of DPMI and virtual memory management is so
complex that we need a very simple criteria, or we risk making this
project a Ph.D.  Percentage of wasted memory is IMHO not good enough
because it assumes too many things about how memory is used (e.g., it
assumes that all allocated memory is paged in, which might not be
correct in some cases).

> wasted. Is this still the case when swapping happens? If I allocate n 
> pages (where n is a large number), and touch only pages 0 and n-1, 
> will the swap file be n pages long or two pages long?

I think it won't page, but you need to actually try it, and do it with
several DPMI servers.

Linking several programs that use memory extensively (cc1, cc1plus and
emacs come to mind) with the two allocators and checking when do they
run out of memory seems also a good idea.

Again, I think this thread should move to djgpp-workers list.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019