473,386 Members | 1,610 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,386 software developers and data experts.

memory allocation fails

Hi

I am running a program on Windows PC with 8GB RAM,64bit intel processor,windows7 64 bit OS.

i use calloc for memory allocation,and is compiled in Microsoft Express edition version 8

My program requires around 6-7 GB of memory allocation of of the 8GB RAM,but after memory allocation of around 1.9GB, calloc returns NULL pointer.

The "Available physical memory is 7.86GB" of the 8GB RAM(displayed in System information)

Hence my question is,why the program is NOT able to allocate memory,even when another 5GB of physical memory is available in the RAM,after memory allocation of around 1.9GB.

Can u guys please tell me,whats probably going wrong,and how i can correct it

thanks in advance for help
Oct 6 '10 #1
3 2496
newb16
687 512MB
If your program is not compiled to a 64-bit executable ( and it most likely isn't because express edition doesn't support*** native 64 bit target) you are limited to 2 or 3 GB address space.

edit: *** googled a bit - actually it supports, but from command line only, not from the IDE.
Oct 6 '10 #2
Hi

I googled earlier to get the steps for compiling express edition 2008,in 64bit to obtain a 64 bit executable

but i am facing following two problems

1) I tried to compile express edition in 64 bit,but,i am not able to import 32 bit project properties into 64 bit project properties.
Hence i am not able to compile it into a 64bit executable.

2) The code i am running is open source,and has dependencies on 32 bit

any help/guidance in solving above problems would be great

thanks
Oct 6 '10 #3
newb16
687 512MB
Windows has AWE - and it apparently works not only on 32-bit systems with PAE but also for 32 bit apps running under WOW64 on EM64T systems. But you will have to allocate-lock-use-unlock memory like it was on 16-bit windows.
Oct 6 '10 #4

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

Similar topics

1
by: Koen | last post by:
Hi! What is the method you use to handle memory allocation failure in C++ using the "new" operator? I used to only check if a NULL pointer is returned after the "new" call, but that's probably...
1
by: Spur | last post by:
Hi all, I implemented a memory allocation/deallocation class that logs all new/delete calls (overloaded) and remembers for each allocated block where it was allocated from (using a macro that...
16
by: Jacob | last post by:
It is common practice (I've heard) to always catch allocation exceptions from "new". How is done in practice? What would be a common procedure (path of sequence) after such an event has occured?...
6
by: chris | last post by:
Hi all, I need to know, what is the difference between dynamic memory allocation, and stack allocation ? 1. If I have a class named DestinationAddress, when should I use dynamic memory...
20
by: iouswuoibev | last post by:
When writing a function that manipulates data (for example, a string), is it in principle a good or bad idea to allocate/deallocate memory within that function? For example, I have the following...
1
by: gerg | last post by:
What happens when memory allocation fails within a STL template?: ie: std::string eg; eg = "example"; Exception? or must we check: std::string eg;
10
by: Alex Vinokur | last post by:
The memory allocation issue in embedded systems is usually critical.. How can one manage that? 1. Via 'new' char* p = new (nothrow) char ; if (p == 0) { // He we know that it is impossible...
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...
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...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

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.