POV-Ray : Newsgroups : povray.programming : Memory? : Re: Memory? Server Time
28 Jul 2024 18:20:04 EDT (-0400)
  Re: Memory?  
From: Nieminen Mika
Date: 8 Aug 1999 07:00:57
Message: <37ad6369@news.povray.org>
"Steve Horn <horn <dot> 74 @ osu" <"dot> edu."> wrote:
: I have recently discovered that POV_MALLOC() is just a
: container-function for the regular ANSI C function malloc().  Since when
: has malloc() been able to access EMS?

  I think it doesn't. The compiler (djgpp, watcom or whatever) just calls
the dpmi driver which does the allocations. Since it works in 32-bit protected
mode, all the memory is available directly, without needing to use ems-pages.
  For example, this is entirely possible in djgpp and watcom:
malloc(100*1024*1024) /* allocate 100 Megs of memory */
  This works even if you have less than 100 Megs of physical RAM (the dpmi
driver creates a swap file).
  As I said, djgpp and watcom work in 32-bit protected mode, so there's no
64KB segment limits nor 640KB memory limit. You can allocate any amount
of any sized memory blocks (up to 4 Gigabytes). They don't call the DOS
memory allocation routines but the dpmi driver routines.

-- 
main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
):5;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.