www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/11/22/07:37:04

From: "Michael N. Filippov" <michael AT idisys DOT iae DOT nsk DOT su>
Newsgroups: comp.os.msdos.djgpp
Subject: Q: SBRK algorithms
Date: 22 Nov 2000 12:32:07 GMT
Lines: 34
Message-ID: <8vgec7$31bj$1@news.itfs.nsk.su>
NNTP-Posting-Host: idisys.iae.nsk.su
X-Trace: news.itfs.nsk.su 974896327 99699 193.124.169.11 (22 Nov 2000 12:32:07 GMT)
X-Complaints-To: usenet AT news DOT itfs DOT nsk DOT su
NNTP-Posting-Date: 22 Nov 2000 12:32:07 GMT
User-Agent: tin/pre-1.4-19990517 ("Psychonaut") (UNIX) (Linux/2.4.0-test1 (i586))
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Hello !

Where can read about malloc -> sbrk -> DPMI server memory allocation
algorithms and configurations ? 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 (even if not "with speed in mind"
as default I suppose). All I see in online docs is:

`_CRT0_FLAG_NONMOVE_SBRK'
     If set, the `sbrk' algorithm uses multiple DPMI memory blocks which
     makes sure the base of CS/DS/SS does not change.  This may cause
     problems with `sbrk(0)' values and programs with other assumptions
     about `sbrk' behavior.  This flag is useful with near pointers,
     since a constant pointer to DOS/Video memory can be computed
     without needing to reload it after any routine which might call
     `sbrk'.

`_CRT0_FLAG_UNIX_SBRK'
     If set, the `sbrk' algorithm resizes memory blocks so that the
     layout of memory is set up to be the most compatible with Unix
     `sbrk' expectations.  This mode should not be used with hardware
     interrupts, near pointers, and may cause problems with QDPMI
     virtual memory.  On NT, this is the recommended algorithm.

     If your program requires a specific `sbrk' behavior, you should
     set either this or the previous flag, since the default may change
     in different libc releases.

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

Thanks in advance,
Michael

- Raw text -


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