Running out of memory [message #205597] |
Tue, 27 November 2007 13:54  |
Eclipse User |
|
|
|
Originally posted by: malte.forkel.berlin.de
Hi,
I'm trying to use Eclipse w/ CDT to work on OpenWrt (www.openwrt.org), a system for building Linux router firmware. OpenWrt works by downloading, patching and compiling everything from scratch, including the cross compiler. So its a pretty big project :-) May be too big.
When I try to 'make' a firmware image, Eclipse fails after a while with an out of (heap) memory error. On exiting Eclipse, I get a progress window while Eclipse is saving the workspace. When I start Eclipse again, java uses as much of the CPU as it can get without telling me what it does (no entry in progress pane) and Eclipse is not usable until finally running out of memory again. It then hangs while saving the workspace and must be killed manually. Sometimes after a restart, Eclipse will now go into burning CPU cycles immediately, sometimes I get as far as calling 'Build Make Target...' from the project's context menu before Eclipse goes off using the CPU for its own important little goals.
Here is my configuration: Eclipse 3.2.1, CDT 3.1.2, and Subclipse 1.2.4 on a Debian Etch machine with 4GB RAM. I'm starting Eclipse with "-vmargs -Xmx1024m -XX:MaxPermSize=128m". The Option to refresh the workspace on startup in General>Startup and Shutdown is off. Also, all options in General>Workspace for building, refreshing and automatically saving the workspace are off. I have pre-defined exclusion filters for the project subdirectories created and populated by OpenWrt while building the firmware image (build_dir/; dl/; staging_dir/; tmp/) in the project properties C/C++ Project Paths>Source and C/C++ Project Paths>Output panes.
My guess is that the first thing I need is a way to tell Eclipse to completely ignore the working directories used by OpenWrt when saving, restoring and refreshing the workspace, so that it does not try to deal with OpenWrt's 200000+ resources. But I'm new to Eclipse and I'd be grateful for any help in understanding and eliminating these problems.
Thanks in advance,
Malte
|
|
|
Re: Running out of memory [message #205664 is a reply to message #205597] |
Wed, 28 November 2007 11:41   |
Eclipse User |
|
|
|
Originally posted by: malte.forkel.berlin.de
Malte Forkel schrieb:
> Hi,
>
> I'm trying to use Eclipse w/ CDT to work on OpenWrt (www.openwrt.org), a
> system for building Linux router firmware. OpenWrt works by downloading,
> patching and compiling everything from scratch, including the cross
> compiler. So its a pretty big project :-) May be too big.
>
> When I try to 'make' a firmware image, Eclipse fails after a while with
> an out of (heap) memory error. On exiting Eclipse, I get a progress
> window while Eclipse is saving the workspace. When I start Eclipse
> again, java uses as much of the CPU as it can get without telling me
> what it does (no entry in progress pane) and Eclipse is not usable until
> finally running out of memory again. It then hangs while saving the
> workspace and must be killed manually. Sometimes after a restart,
> Eclipse will now go into burning CPU cycles immediately, sometimes I get
> as far as calling 'Build Make Target...' from the project's context menu
> before Eclipse goes off using the CPU for its own important little goals.
>
> Here is my configuration: Eclipse 3.2.1, CDT 3.1.2, and Subclipse 1.2.4
> on a Debian Etch machine with 4GB RAM. I'm starting Eclipse with
> "-vmargs -Xmx1024m -XX:MaxPermSize=128m". The Option to refresh the
> workspace on startup in General>Startup and Shutdown is off. Also, all
> options in General>Workspace for building, refreshing and automatically
> saving the workspace are off. I have pre-defined exclusion filters for
> the project subdirectories created and populated by OpenWrt while
> building the firmware image (build_dir/; dl/; staging_dir/; tmp/) in the
> project properties C/C++ Project Paths>Source and C/C++ Project
> Paths>Output panes.
>
> My guess is that the first thing I need is a way to tell Eclipse to
> completely ignore the working directories used by OpenWrt when saving,
> restoring and refreshing the workspace, so that it does not try to deal
> with OpenWrt's 200000+ resources. But I'm new to Eclipse and I'd be
> grateful for any help in understanding and eliminating these problems.
> Thanks in advance,
> Malte
>
>
Some more findings: In order to make Eclipse usable again, I deleted all contents of the OpenWrt working folders build_dir, staging_dir, and tmp. (The forth, dl, only contains downloaded source archive.) I was able to start Eclipse and issue a 'Refresh' command for the OpenWrt project. After about 15 minutes of refreshing the workspace, Eclipse ran out of memory again. After restarting Eclipse, the next refresh finished within just a few of seconds.
Searching for files that had changed, I discovered a 195 MB file named 45.tree in .metadata/.plugins/org.eclipse.core.resources/.root. Next largest file is .syninfo in .metadata/.plugins/org.eclipse.core.resources/.projects/Edim axOpenWrt with 3.5 MB. Why is 45.tree so huge with only five small projects left in Eclipse? Could I just delete 45.tree and refresh all projects?
Malte
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.09259 seconds