www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1993/07/13/19:59:39

Date: Tue, 13 Jul 93 19:50:22 EDT
From: DJ Delorie <dj AT ctron DOT com>
To: JMILLER AT chess DOT eisc DOT utoledo DOT edu
Cc: djgpp AT sun DOT soe DOT clarkson DOT edu
Subject: Re: Questions on recent posts

> About a week ago, there was information about getting microsecond delays
> (as I recall) with djgpp. If this is correct, what function was used. I 
> don't believe the usleep has been implemented. Also, I did a little

Check the sources for usleep - it might be fixed in 1.10, or maybe
you'll have to wait for 1.11.  You could always call clock() in a busy
loop.

> experimenting with malloc by requesting 1 meg of memory and 1 meg + 1 byte
> using debug32. About 1.3 megs were used in each case but not the 4 megs that
> would be expected if malloc allocated only powers of 2. Am I missing
> something obvious here?

go32 will not actually allocate memory until you access it, except in
DPMI mode.  You could ask for 1 Gb and it would give it to you, and
show very little actually used.  You need to print the value of
sbrk(0) after each call to determine how much virtual space is being
used.

- Raw text -


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