Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

malloc( )- is there any size limit

Status
Not open for further replies.

JackMorris

Technical User
Jan 30, 2003
18
IE
is there any size limit in defining the runtime memory with malloc() ?

thanx.
 
yes i believe it is OS dependent. Is this related to your other thread?

-pete
 
It is OS dependent, like palbano says. I believe Windows allocates 4gb memory for your process, of which 2gb is for you to use and the other for Windows itself. In special circumstances (don't know exactly how anymore) you could change that ratio to 3gb to 1gb in your favor on Windows 2000 (and probably NT).

But don't forget: the actual size you can allocate depends on how large a block of unfragmented unused memory still resides in your process. It's highly unlikely you'll ever get to allocate the full bunch....
Greetings,
Rick
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top