Mail Archives: djgpp/1997/10/16/23:02:15
Manuel Porras wrote:
>
> How can i allocate Extended memory ?
> I use malloc but it works only on conventional.
> I saw __dpmi_allocate_memory but i dont know how to use it
> and if it is equivalent to malloc ().
Actually, you are wrong. DJGPP is a 32-bit protected mode compiler. It
gives you access to all the memory on your computer, plus up to 128 MB
of virtual memory, as one contiguous memory segment. You can malloc()
as large an object as you want and never worry about crossing segments
or running out of conventional memory.
Different DPMI hosts (cwsdpmi, Windows, Linux, OS/2) give you different
amounts of memory to work with, but you can count on at least 64
megabytes if your computer has that much RAM plus free disk space.
cwsdpmi allows up to 128 MB physical plus 128 MB virtual for a total of
256 MB. You can run the 'go32-v2' program provided with DJGPP to see
how much memory you have available.
Welcome to DPMI, where extended and expanded memory are things of the
past. :)
--
---------------------------------------------------------------------
| John M. Aldrich | "Money is truthful. If a man speaks |
| aka Fighteer I | of his honor, make him pay cash." |
| mailto:fighteer AT cs DOT com | |
| http://www.cs.com/fighteer | - Lazarus Long |
---------------------------------------------------------------------
- Raw text -