aMule Forum
English => Compilation problems => Topic started by: michelinok on March 29, 2011, 07:33:21 PM
-
Hi there!
I need amuled to use less memory...i'm running it on an at91sam9g20 with 64mb ram.
This is the config i'm using during the compilation:
./configure --host=$TARGET --with-zlib=$BUILDDIR/tmp --with-wx-prefix=$BUILDDIR/tmp --with-wx-config=$BUILDDIR/tmp/bin/wx-config --with-crypto-prefix=$BUILDDIR/tmp --prefix=$BUILDDIR/tmp --enable-amulecmd --enable-amule-daemon --enable-webserver --enable-alcc --disable-monolithic --enable-optimize --enable-mmap --disable-ed2k --enable-static --disable-amule-gui --disable-upnp --disable-nls --disable-debug --with-libpng-prefix=/home/michele/Scrivania/build/tmp/
I really need KAD, this is the only thing! I've lowerd a lot the connections (50/50 if i remember).
Is there any other optimization that i can use during the compilation step?
Many thanks!
-
You could try to compile amule with -Os, but I don't know if that will get you some gain.
-
You could try to compile amule with -Os, but I don't know if that will get you some gain.
The parameter is not valid...are you sure of -Os ?? (i've also tryed --Os but still doesn't know the parameter).
-
You could try to compile amule with -Os, but I don't know if that will get you some gain.
The parameter is not valid...are you sure of -Os ?? (i've also tryed --Os but still doesn't know the parameter).
Sorry, I didn't explain what has to change. In the file acinclude.m4 change:
acinclude.m4: MULE_IF_ENABLED([optimize], [MULE_ADDCCXXFLAG([-O2])])
by
acinclude.m4: MULE_IF_ENABLED([optimize], [MULE_ADDCCXXFLAG([-Os])])
and run configure again.
This tweak is untested and we don't know what could happen.
From my particular testing wxString was eating lot of ram, you could try to debug it by modifying wxWidgets.
By the way, has wxWidgets support for memory debugging (that is, trapping new and delete?]
-
You must also run autogen.sh
-
Did some testing:
$ ./configure --disable-ed2k --disable-alcc -disable-alc --disable-cas --disable-wxcas --disable-upnp --enable-optimize --disable-debug --disable-nls --enable-amule-daemon --disable-monolithic
With -Os
2161302 2011-03-30 20:32 src/amuled
$ strip src/amuled
1690800 2011-03-30 20:40 src/amuled
with -O2
2591188 2011-03-30 20:35 src/amuled
$ strip src/amuled
2149632 2011-03-30 20:38 src/amuled
So almost half a megabyte of saving. Not bad from a "free" optimization, but I guess you'll need to investigate runtime in order to have bigger savings. Don't forget to strip your binary if you are doing a "manual" install.
-
Taking a look at your optimization i've tryed...but cannot get your results...
Using -Os i've taken an executable of 12mb and using "strip" i got a 4mb executable...but it eats a lot of ram...too much for me!
I only need the daemon and amulecmd,nothing more.
I've modified the .m4 and used this config:
./configure --host=$TARGET --with-zlib=$BUILDDIR/tmp --with-wx-prefix=$BUILDDIR/tmp --with-wx-config=$BUILDDIR/tmp/bin/wx-config --with-crypto-prefix=$BUILDDIR/tmp --prefix=$BUILDDIR/tmp --enable-amulecmd --enable-amule-daemon --enable-webserver --disable-alcc --disable-monolithic --enable-optimize --enable-mmap --disable-ed2k --enable-static --disable-amule-gui --disable-upnp --disable-nls --disable-debug --disable-alc --disable-cas --disable-wxcas --with-libpng-prefix=/home/michele/Scrivania/build/tmp/
Any other suggestions?