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

Out of memory compilation

Hey!

I have a little problem here.. I am trying to compile a huge C++ code
of about 2 lakh lines and the compilation gives me the following error

cc1plus: out of memory allocating 42381928 bytes after a total of
391704576 bytes
make: *** [model_1.o] Error 1

I am running this on a server with 4 GB RAM..

The code uses ILOG libraries.. ILOG is a licensed constraint solver...

Why would a code compilation need so much memory and how can I find
where exactly is it consuming so much memory?

Akanksha

Jun 27 '07 #1
5 7994
On Wed, 27 Jun 2007 08:43:11 +0000, Akanksha wrote:
Hey!

I have a little problem here.. I am trying to compile a huge C++ code of
about 2 lakh
I had to Google for that (my knowledge of languages of the Indian
subcontinent being non-existent). Would I be right in saying that 1 lakh
= 100,000?
lines and the compilation gives me the following error

cc1plus: out of memory allocating 42381928 bytes after a total of
391704576 bytes
make: *** [model_1.o] Error 1

I am running this on a server with 4 GB RAM..
That's a fair wack of memory to run out of...
The code uses ILOG libraries.. ILOG is a licensed constraint solver...

Why would a code compilation need so much memory and how can I find
where exactly is it consuming so much memory?
You'd probably be best to ask on a forum for your compiler (I'm guessing
GCC, so maybe try gnu.gcc.help or the GCC mailing lists).

--
Lionel B
Jun 27 '07 #2
Yea.. its 100,000 :)

I am using g++ which is why i posted here.. I ran a verbose mode and
it apparently takes max time in expand and combining.. I dont know
what that is.. Could anyone tell me where exactly does a compiler eat
memory?

Akanksha

On Jun 27, 3:38 pm, Lionel B <m...@privacy.netwrote:
On Wed, 27 Jun 2007 08:43:11 +0000, Akanksha wrote:
Hey!
I have a little problem here.. I am trying to compile a huge C++ code of
about 2 lakh

I had to Google for that (my knowledge of languages of the Indian
subcontinent being non-existent). Would I be right in saying that 1 lakh
= 100,000?
lines and the compilation gives me the following error
cc1plus: out of memory allocating 42381928 bytes after a total of
391704576 bytes
make: *** [model_1.o] Error 1
I am running this on a server with 4 GB RAM..

That's a fair wack of memory to run out of...
The code uses ILOG libraries.. ILOG is a licensed constraint solver...
Why would a code compilation need so much memory and how can I find
where exactly is it consuming so much memory?

You'd probably be best to ask on a forum for your compiler (I'm guessing
GCC, so maybe try gnu.gcc.help or the GCC mailing lists).

--
Lionel B

Jun 27 '07 #3
On Jun 27, 9:04 am, Akanksha <akanksha.jain...@gmail.comwrote:
[snip]
Could anyone tell me where exactly does a compiler eat
memory?
Yes. Someobody could tell you. In a news group dedicated
to your compiler and platform.

Search at groups.google.com for news groups that talk about
your compiler.

Also, don't top post. Top posting allows the Vorlons to
contact the foul Marmidons. And nobody wants that.

Not even the Vorlons.
Socks

Jun 27 '07 #4

Please don't top-post... like I'm doing now ;-)

Rearranged.

On Wed, 27 Jun 2007 13:04:10 +0000, Akanksha wrote:
Akanksha

On Jun 27, 3:38 pm, Lionel B <m...@privacy.netwrote:
>On Wed, 27 Jun 2007 08:43:11 +0000, Akanksha wrote:
Hey!
I have a little problem here.. I am trying to compile a huge C++ code
of about 2 lakh

I had to Google for that (my knowledge of languages of the Indian
subcontinent being non-existent). Would I be right in saying that 1
lakh = 100,000?
Yea.. its 100,000 :)
[...]
Why would a code compilation need so much memory and how can I find
where exactly is it consuming so much memory?

You'd probably be best to ask on a forum for your compiler (I'm
guessing GCC, so maybe try gnu.gcc.help or the GCC mailing lists).
I am using g++ which is why i posted here..
If you're using g++ and the issue is compiler-specific (which it is and
therefore off-topic here), then why didn't you try on a GCC/g++ newsgroup
as suggested?

[...]
>--
Lionel B
^^^^^^^^
Please don't quote signatures (a decent newsreader should lose them for
you).

--
Lionel B
Jun 27 '07 #5
On Jun 27, 9:42 pm, Lionel B <m...@privacy.netwrote:
Please don't top-post... like I'm doing now ;-)
Thanks! Will keep that in mind.. Am new to posting on forums :-)
Rearranged.

On Wed, 27 Jun 2007 13:04:10 +0000, Akanksha wrote:
Akanksha
On Jun 27, 3:38 pm, Lionel B <m...@privacy.netwrote:
On Wed, 27 Jun 2007 08:43:11 +0000, Akanksha wrote:
Hey!
I have a little problem here.. I am trying to compile a huge C++ code
of about 2 lakh
I had to Google for that (my knowledge of languages of the Indian
subcontinent being non-existent). Would I be right in saying that 1
lakh = 100,000?
Yea.. its 100,000 :)

[...]
Why would a code compilation need so much memory and how can I find
where exactly is it consuming so much memory?
You'd probably be best to ask on a forum for your compiler (I'm
guessing GCC, so maybe try gnu.gcc.help or the GCC mailing lists).
I am using g++ which is why i posted here..

If you're using g++ and the issue is compiler-specific (which it is and
therefore off-topic here), then why didn't you try on a GCC/g++ newsgroup
as suggested?
Did that!
>
[...]
--
Lionel B

^^^^^^^^
Please don't quote signatures (a decent newsreader should lose them for
you).

--
Lionel B

Jun 28 '07 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: John C | last post by:
Had an error message appear quite suddenly Friday evening/Saturday morning without any updating of our ASP application. Here is the technical setup W2K Adv IIS5 server, ~ 400 sites, dual 1ghz,...
1
by: Alex Vinokur | last post by:
Hi, I have a problem with invoking an instance before main() when using memory allocation for static member. Is the program below valid? =========================================== Windows...
5
by: Jason Callas | last post by:
I was doing starting some experimenting with the GC and ran into the following odd result. I created an object and my used memory went up by almost 11k but when I cleared it and forced a collection...
4
by: Zeng Dinghao | last post by:
could anybody explain the term "in memory compilation" to me ? thanks
30
by: jimjim | last post by:
Hello, This is a simple question for you all, I guess . int main(){ double *g= new double; *g = 9; delete g; cout<< sizeof(g)<<" "<<sizeof(double)<<" "<<sizeof(*g)<<" "<<*g<<" "<<endl; *g =...
25
by: Zeng | last post by:
I finally narrowed down my code to this situation, quite a few (not all) of my CMyClass objects got hold up after each run of this function via the simple webpage that shows NumberEd editbox. My...
62
by: ivan.leben | last post by:
How can I really delete a preloaded image from memory/disk cache? Let's say I preload an image by creating an Image object and setting its src attribute to desired URL: var img = new Image();...
3
by: Akanksha | last post by:
Hey! I have a little problem here.. I am trying to compile a huge C++ code of about 2 lakh lines and the compilation gives me the following error cc1plus: out of memory allocating 42381928...
17
by: kumar | last post by:
hi i want to know where & how the C variables gets stored i mean like volatile , pointer and string variables gets stored , whether it is on stack or some other places if is there any clear...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
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
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...

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.