[prev in list] [next in list] [prev in thread] [next in thread]
List: konq-e
Subject: Workaround for memory limits on iPAQ during compilation
From: "Lawrence E. Widman" <widman () cardiothink ! com>
Date: 2001-07-09 6:38:25
[Download RAW message or body]
Here is the fix for the problem below:
> > I encountered the following problems while trying to compile
> > snapshot-20010702 on an iPAQ with 32 MB RAM, 1 GB microdrive
> > with 32 MB swap space, and the intimate/Debian Linux
> > distribution:
> >
> > 1. ./konq-embed/kdesrc/khtml/misc/helper.cpp would not
> > compile. The error was "compiler received signal 15",
> > which I figured meant that memory was too small.
>
> There's nothing I can do about this one. It's nothing that can
> be fixed source code wise. You might better cross-compile on
> a machine with more RAM ;-)
Turns out that Linux can use files for swap as well as disk
partitions. So, the solution is (read the man page for mkswap):
mkdir /swap2 (or whereever you want to put the swap file(s))
dd if=/dev/zero of=/swap2/swapfile bs=1024 count=31000
mkswap -f /swap2/swapfile
/sbin/swapon /swap2/swapfile
(more than one swapfile can be created and used. The system
uses however many it is given, up to N=3 at least!)
I created an extra 31 MB swap file and recompiled konqueror /
embedded. The compiler ran out of memory in helper.cpp. I
created another 31 MB swap file (total of 32 MB RAM and 94 MB
swap). The compiler ran out of memory :( . I created a 130 MB
swap file for a total of 32 MB RAM and 214 MB swap! Then I
watched top as it compiled that module. The peak memory usage
was 29.9 MB RAM and 106.7 MB swap, for a total of 136.6 MB peak
memory usage. The only other module that came close was
khtml_part.cpp, which took a very long time to compile but
needed only 54.3MB swap plus 32MB RAM. I now have konqueror up
and running on the iPAQ after 100% native compilation. (The
only problem with the install was that the fonts are in
$QTDIR/etc/fonts and konqueror expects them in
$QTDIR/lib/fonts. A simple "ln -s" takes care of that.)
After compilation is done, the swap files can be deactivated by
syncing and rebooting. It may be safe to use swapoff, but I
don't know that for sure. After the system is rebooted, they
won't be used unless swapon is executed again, so they can be
deleted at that point.
_______________________________________________
Konq-e mailing list
Konq-e@master.kde.org
http://master.kde.org/mailman/listinfo/konq-e
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic