www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/11/22/08:18:17

Date: Wed, 22 Nov 2000 15:11:30 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: "Michael N. Filippov" <michael AT idisys DOT iae DOT nsk DOT su>
cc: djgpp AT delorie DOT com
Subject: Re: Q: SBRK algorithms
In-Reply-To: <8vgec7$31bj$1@news.itfs.nsk.su>
Message-ID: <Pine.SUN.3.91.1001122150443.21878B-100000@is>
MIME-Version: 1.0
Reply-To: djgpp AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

On 22 Nov 2000, Michael N. Filippov wrote:

> Where can read about malloc -> sbrk -> DPMI server memory allocation
> algorithms and configurations ?

In the library sources only, I'm afraid.  People who wrote that stuff are 
still here, so you can ask questions, if something in the sources is not 
clear.

> I know that in this chain each part
> keeps some info and tries to group requested memory. It is interesting
> because I'd like to know limitations and how much memory this keeping
> takes for each stage to use more memory

Put it simply, sbrk allocates in chunks of 64KB, and malloc has a fixed 
overhead of 8 bytes per allocated buffer.

> But what is default or UNIX strategy I dont know, Sorry if this is a silly
> question: I'm a nebie in DJGPP.

I really cannot imagine that these fine details could be of any practical 
importance, unless you have specific problems, like a memory-intensive 
program that refuses to run because it fails to allocate enough memory.  
(If this is the case, please describe the details and then ask specific 
questions about your case.)

If you want to study the memory allocation used by DJGPP, I can tell what 
source files to read, as a starting point.

- Raw text -


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