delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/10/26/02:22:07

From: cgjks1 AT lut DOT ac DOT uk (James Soutter)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: sbrk ?
Date: 26 Oct 1996 05:23:07 GMT
Organization: Loughborough University, UK.
Lines: 21
Distribution: world
Message-ID: <54s77r$phg@sun-cc204.lboro.ac.uk>
References: <54qkhh$j8h AT salomon DOT mchp DOT siemens DOT de>
NNTP-Posting-Host: cgneiss.lut.ac.uk
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

: Ulrich Lauther (lauther AT cayley DOT zfe DOT siemens DOT de) wrote:
: 
: I need to port my own memory manager from Unix to NT/Visual C++ and
: can't find a sbrk function there.
: 
: Would it be a good idea to steal the sbrk.s (which uses INT 21) from
: the djgpp package, or would I get a grandiose crash?
: 
:         -ulrich


Excuse my ignorance by why use sbrk().  I thought changing sbrk() was a
bad idea because it broke the library functions that called malloc().

In DJGPP, why not just use "__dpmi_allocate_memory" to allocate new
memory for the memory manager (I havn't tried this).  Similarly under
UNIX, why not just use mmap on /dev/zero to allocate memory (it works
for me).


-- James

- Raw text -


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