Mail Archives: djgpp/1996/10/26/02:22:07
: 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 -