LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 03-30-2007, 03:02 PM   #1
shayan_tabrizi
LQ Newbie
 
Registered: Jul 2004
Location: Tehran
Posts: 24

Rep: Reputation: 15
Question gcc Virtual Memory error.


I have a 200MB source in c that cannot be devided into smaller parts.
When i compile it with gcc it with gcc it says : "virtual memory exhausted: Cannot allocate memory"
How can i do to resolve this problem.
Please answer me as soon as you can.
 
Old 03-30-2007, 03:22 PM   #2
osor
HCL Maintainer
 
Registered: Jan 2006
Distribution: (H)LFS, Gentoo
Posts: 2,450

Rep: Reputation: 78
How much memory do you have? How much swap?
 
Old 03-30-2007, 04:12 PM   #3
tuxdev
Senior Member
 
Registered: Jul 2005
Distribution: Slackware
Posts: 2,012

Rep: Reputation: 115Reputation: 115
Sorry, there is NO WAY that a 200 meg source file can't be divided up (AKA modularized). Even generated code never gets that big. Step back and refactor.

Last edited by tuxdev; 03-30-2007 at 04:14 PM.
 
Old 03-31-2007, 01:12 AM   #4
graemef
Senior Member
 
Registered: Nov 2005
Location: Hanoi
Distribution: Fedora 13, Ubuntu 10.04
Posts: 2,379

Rep: Reputation: 148Reputation: 148
I would hope that the 200Mb source is multiple files. If not... wow! ...please break it up into more reasonable fils sizes.

Is any of this source actually data (200Mb of source code is impressive! or is that frightening?) If you do have some data then take it out and get the program to read it in when it runs rather than trying to embed it at compile time.

And as previously asked just how much memory does you machine have at the moment?
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
insufficient virtual memory johnpaulodonnell Programming 6 03-29-2007 10:27 AM
virtual memory newbiesforever Linux - General 11 06-29-2006 01:07 PM
C and virtual memory abdobl Programming 3 10-04-2004 12:14 PM
Virtual Memory? mikeshn Linux - General 11 01-15-2004 01:47 PM
RH 8.0 Mapping Virtual Memory to get access to VMIC Reflective Memory PCI card. Merlin53 Linux - Hardware 0 05-05-2003 12:50 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 04:11 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration