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

How to increase heap used by a C program beyond 3gb?

I have a C code, which I have written for a large data set. The total memory available on the machine is above 8Gb, but the code is able to only use about 3 Gb. In C, how can I increase the space taken per process.
Feb 15 '11 #1
4 2286
johny10151981
1,059 1GB
choose a proper compiler may help.........

i am curious to know the solution too
Feb 16 '11 #2
horace1
1,510 Expert 1GB
sound like you are using a 32 bit compiler and/or running under a 32 bit operating system.
You need a 64 bit operating system and a compiler that will generate 64 bit code so it can address memory above 4G
http://windows.microsoft.com/en-US/w...sked-questions
Feb 16 '11 #3
tdlr
22
You need to use a 64 Bit OS and a 64bit compatible compiler because 32 bit porgrams/os's are only able to address 4gb of memory including graphics memory and others, which leaves around 3gb of addressable RAM. So I believe that the real problem is you using a 32 bit system.

edit: woops, 2 minutes too slow ;)
Feb 16 '11 #4
weaknessforcats
9,208 Expert Mod 8TB
You can use a segmented database design.

Here you define a segment and store the segments several thousand disc files. Next you build an index file that has the access key plus the segment number plus the offset into that segment. The index resides in memory. Then you use the index file to fetch a segment.

Actaully, I would skip all this engineering and use something like Oracle where all this work is already done.
Feb 16 '11 #5

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

Similar topics

3
by: nvjoglekar | last post by:
Hi All My program needs a lot of memory and after allocating some using NEW statement, it returns NULL for any new object created. I guess that is becuase of the heap size limitation of the...
1
by: nrhayyal | last post by:
hi all, i am working on C++ on AIX machine. i am running one of my module which is built using 10+ user built libraries. i am getting St9bad_alloc exception. i came to know that this exception...
3
by: gary | last post by:
Hi, 1. About all C/C++ compilers, Does stack increase from high address to low address and heap grow increase from low to high? What on earth decides their increase direction, CPU architecture, OS...
0
by: Erik Hendrix | last post by:
Hi, I was wondering if someone maybe knew what is stored in the following memory array and maybe give a clue as in why it is not released anymore: I have 1 agent which reports the following...
29
by: keredil | last post by:
Hi, Will the memory allocated by malloc get released when program exits? I guess it will since when the program exits, the OS will free all the memory (global, stack, heap) used by this...
3
by: Klaus Bonadt | last post by:
I guess this is a new function for VS 2003, but how to obtain this information in VC6 and VC7? Best regards, Klaus
9
by: Ajay | last post by:
Hi all, Can I know what is the stack space and heap space allocated by the compiler.Can i increase it or decrease it.if yes,pleae tell me theway to do it.Thanks in advance. Cheers, Ajay
0
by: pigeonrandle | last post by:
Hi, You know, the ones that are displayed in the XP Start menu? Anyone know where they are/how to get a list of them. Many thanks (again), James Randle.
8
by: Horacius ReX | last post by:
Hi, I am developing some code in C which first I compile on my linux machine and afterwards I test on another special hardware which has almost no debug capabilities at all. Usually I get a lot...
0
by: naveenkongati | last post by:
Hi, I am getting a Exception Java.land.OutofMemoryError:Java Heap Size on a application which is running on Tomcat6. When i try to find the solution on web i found heap size needs to be increated on...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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,...
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...

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.