473,397 Members | 2,099 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

Allocation of large memblock unexplainably fails

dzenanz
45
Hello!

In a certain function i have a line
Expand|Select|Wrap|Line Numbers
  1. m_pBuffer = new double[512*512*736]; //~1.5GB
the allocation fails here. At that time, process' virtual memory size is 380MB (information obtained using task manager), and there is over 2GB of free RAM.

WinXP SP3 32-bit, same thing happens with VS2005 and VS2008.

I have tried setting "Support Addresses Larger Than 2 Gigabytes (/LARGEADDRESSAWARE)". It has no effect.

If I use /HEAP:reserve, and set the size to 1.5GB or more, then other allocation (368MB), which comes before this big one, fails.

Do you have some ideas what is causing this, and perhaps suggestions how to overcome this problem?

How much effect would have to try this on 64-bit machine?

Dženan
Jan 30 '09 #1
1 1762
newb16
687 512MB
Does GetProcessHeap()+HeapAlloc() with same amount work? I think it's worth trying on 64-bit machine.
Jan 30 '09 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Robert May | last post by:
Hi, I am trying to execute some code compiled by g++ on Linux and have found that after some time, the program allocates a huge amount of swap space (250MB on my machine which has 512MB...
11
by: toton | last post by:
Hi, I have little confusion about static memory allocation & dynamic allocation for a cluss member. I have class like class Bar{ public: explicit Bar(){ cout<<"bar default"<<endl; }
24
by: Ken | last post by:
In C programming, I want to know in what situations we should use static memory allocation instead of dynamic memory allocation. My understanding is that static memory allocation like using array...
18
by: hyperboogie | last post by:
Hello all I'm pretty new to C, so please accept my apologies in advance :-) I'm trying to allocate space for an array of pointers to strings (which are accepted as ellipses) inside a while...
1
by: Peterwkc | last post by:
Hello all expert, i have two program which make me desperate bu after i have noticed the forum, my future is become brightness back. By the way, my problem is like this i the first program was...
1
by: vectorizor | last post by:
Hello all, I am writing a Photoshop plug-in on Windows, and I am having trouble with allocating memory. Essentially, the code performs a very complex operation on the image, so 9 buffer planes...
158
by: jacob navia | last post by:
1: It is not possible to check EVERY malloc result within complex software. 2: The reasonable solution (use a garbage collector) is not possible for whatever reasons. 3: A solution like the...
10
by: swornavidhya.mahadevan | last post by:
Which allocation (Static / Dynamic) is suitable for the situation when we are trying to allocate for a overloaded memory when the memory is full and no space to allocate. What will happen if both...
7
by: JonLT | last post by:
Hi! I'm trying to learn some network programming and right now im designing the package layout. I think ill do it like this: - first two bytes (an int): the size of the package - third byte:...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.