By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
432,462 Members | 799 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 432,462 IT Pros & Developers. It's quick & easy.

memory allocation fails

P: 2

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
Share this Question
Share on Google+
3 Replies

P: 687
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

P: 2

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

Oct 6 '10 #3

P: 687
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

Post your reply

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