delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1997/11/10/15:34:08

From: sandmann AT clio DOT rice DOT edu (Charles Sandmann)
Message-Id: <9711102035.AA14775@clio.rice.edu>
Subject: Re: malloc()
To: sjmachin AT lexicon DOT net DOT au (John Machin)
Date: Mon, 10 Nov 1997 14:35:12 -0600 (CST)
Cc: djgpp-workers AT delorie DOT com
In-Reply-To: <199711101946.GAA27953@mona.lexicon.net.au> from "John Machin" at Nov 11, 97 06:44:49 am

> > pathalogical data initialization codes to see how they perform in
> What are these, please?

There were some examples discussed on the NG/Mailing list about a month
back, in which the initialization of an array with a large number of
elements consumed a huge amount of memory.  I would suggest checking the
mailing list archives - I don't remember the details.

> I am doing various experiments with instrumenting source code to get
> statistics on memory usage. I have found that calling
> _go32_dpmi_remaining_physical_memory() frequently (like after every
> malloc() call) slows things way down, to the extent that I have to
> run experiments twice, once with the call to measure memory usage
> and once without to get a more meaningful speed comparison.
> 
> Is there a faster way of getting the required info?

Running it twice is probably the best thing to do.

- Raw text -


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