Mail Archives: djgpp/1998/04/04/23:16:51
Thanks John and Charles -
By dropping out of Win95 and running CWSDPMI I was able to gain more
memory; alot more. I also added some code to see just exactly how much memory
the program was asking for in bytes. What I found was that there was no way I
would get enough resources (perhaps with a Cray). Then I attempted to add some
DPMI calls to check available memory in the program, which I may have
incorrectly called. Curious what the proper call would be to report all
available memory? I used __dpmi_get_memory_information with a call to
the total_available_bytes_of_virtual_memory_host member. Is this proper?
If I had this value I could exit the program more gracefully. In any case its
running better now with your help. Thanks.
- Greg
In article <35256B92 DOT 76B4 AT cs DOT com>, fighteer AT cs DOT com says...
>
>What Charles Terry said is entirely correct; I should add that, to see
>how much physical and virtual memory DJGPP programs think is available,
>type "go32-v2" from the DOS prompt. If the numbers add up to less than
>64 MB, make sure you have the MS-DOS prompt properties sheet configured
>properly in Windows 95.
>
>Please also note that DJGPP malloc() rounds all memory requests up to
>the nearest power of 2, and Windows 95's DPMI host won't let you
>allocate any more than half of the remaining virtual memory in any
>single chunk. So, calling malloc() with a request greater than or near
>to 32 MB is almost guaranteed to fail even though it looks like you have
>enough available memory.
>
>If you don't like this behavior, run in DOS with cwsdpmi, which lets you
>use up to 256 MB of combined physical and virtual memory (up to 512 MB
>with revision 4).
>
>--
>---------------------------------------------------------------------
>| John M. Aldrich | "A committee is a life form with six |
>| aka Fighteer I | or more legs and no brain." |
>| mailto:fighteer AT cs DOT com | |
>| http://www.cs.com/fighteer | - Lazarus Long |
>---------------------------------------------------------------------
- Raw text -