Talk About Network



Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > C++ Leda > allocation memo...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 2 Topic 131 of 212
Post > Topic >>

allocation memory failure with new operator

by alonhes@[EMAIL PROTECTED] (Alon Hessing) May 31, 2004 at 08:13 AM

Hi,
I try to allocate memory simply by using the new operator:
     void* pMem = new unsigned char[1000*1024*1024]
Notice that I'm trying to allocate 1000 MB in a computer with 2 GB
memory.
The allocation fail and the return value is NULL.
The same allocation succeeded when I doing it from a small test
program I wrote(and not as a part of my original project).
I managed to allocate 700MB.
Do you have any idea what could cause such a behaviour?

Please help

Alon




 2 Posts in Topic:
allocation memory failure with new operator
alonhes@[EMAIL PROTECTED]  2004-05-31 08:13:47 
Re: allocation memory failure with new operator
Alexandre Reinhardt <a  2004-06-02 09:53:02 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Mon May 12 9:47:46 CDT 2008.