TIP: Click on subject to list as thread! ANSI
echo: os2prog
to: Terry Fry
from: Peter Fitzsimmons
date: 1996-07-25 15:13:44
subject: 230meg Limit under OS/2?

TF> All the documentation says that this should work:

 TF>  rc = DosAllocMem(&mem1,300000000,PAG_WRITE);

 TF>  but it always returns 8, NOT_ENOUGHT_RAM.

 TF>  I can't allocate anything more than 230meg, however
 TF> the documentation says I should be able to get around 448meg per process.

 TF> (The 230meg is a combined number of shared/private ask 
 TF> for more of one, it reduces the amount of the other 
 TF> available.)

 TF>   Any ideas?

The 512mb is an address limitation,  so that thunking to 16:16 can be done
with an easy/quick bit adjustment.

So the answer is yes:  the amount of shared code & data eats away at
your useable address space.

On my machine,  I was able to allocate up to 232650000 bytes before I got an error 8.

I assume you are allocating such a large object with the plans to
not-commit it all (ie: a sparse object).  I suggest you let C++ do it for
you (create a class that looks like a memory pointer but really does file
i/o),  or use Windows NT instead.


--- Maximus/2 3.00
* Origin: Sol 3 * Toronto * V.32 * (905)858-8488 (1:259/414)
SEEN-BY: 50/99 270/101 620/243 625/100 711/401 409 410 413 430 808 809 934
SEEN-BY: 711/955 712/407 515 624 628 713/888 800/1
@PATH: 259/414 400 99 250/99 3615/50 396/1 270/101 712/515 711/808 934

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.