I have a few questions aregarding size optimization : 1. I have already applied the linux kernel Tiny patch but I need to further reduce the size of the kernel.Any suggestions? 2. Is there a tool with low memory footprint to find out the dynamic memory usage of applications during runtime?Applications like iptables,ebtables etc that cannot be made to run in background? 3. Is there any freeware tool that helps find unused functions correctly by parsing some huge C/C++ source code? Any suggestions would be welcome.Thanks.
Size Optimization for an embedded system
Started by ●April 2, 2007
Reply by ●April 2, 20072007-04-02
"jeniffer" <zenith.of.perfection@gmail.com> writes:> I have a few questions aregarding size optimization : > 1. I have already applied the linux kernel Tiny patch but I need to > further reduce the size of the kernel.Any suggestions? > 2. Is there a tool with low memory footprint to find out the dynamic > memory usage of applications during runtime?Applications like > iptables,ebtables etc that cannot be made to run in background? > 3. Is there any freeware tool that helps find unused functions > correctly by parsing some huge C/C++ source code?-Wunused-function is a gcc option which you could consider for (3)
Reply by ●April 2, 20072007-04-02
On Mon, 02 Apr 2007 03:32:34 -0700, jeniffer wrote:> I have a few questions aregarding size optimization : > 1. I have already applied the linux kernel Tiny patch but I need to > further reduce the size of the kernel.Any suggestions? > 2. Is there a tool with low memory footprint to find out the dynamic > memory usage of applications during runtime?Applications like > iptables,ebtables etc that cannot be made to run in background? > 3. Is there any freeware tool that helps find unused functions > correctly by parsing some huge C/C++ source code? > > Any suggestions would be welcome.Thanks.I've never used it but you might look at http://sourceforge.net/projects/libraryopt/
Reply by ●April 2, 20072007-04-02
In comp.arch.embedded jeniffer <zenith.of.perfection@gmail.com> wrote:> 2. Is there a tool with low memory footprint to find out the dynamic > memory usage of applications during runtime?Applications like > iptables,ebtables etc that cannot be made to run in background?Why would you run the iptables program in the background? And what difference to memory usage would it make? The iptables program simply loads configuration data into the kernel to control the kernel's netfilter functions.
Reply by ●April 2, 20072007-04-02
In comp.os.linux.development.system jeniffer <zenith.of.perfection@gmail.com> wrote in part:> I have a few questions aregarding size optimization : > 1. I have already applied the linux kernel Tiny patch but I need to > further reduce the size of the kernel.Any suggestions?Use an older kernel. 2.4 uses less RAM than 2.6 .> 2. Is there a tool with low memory footprint to find out the dynamic > memory usage of applications during runtime?Applications like > iptables,ebtables etc that cannot be made to run in background?`ps` and `top` are the standards. They do multiple-count shared usage (libs).> 3. Is there any freeware tool that helps find unused functions > correctly by parsing some huge C/C++ source code?Your compiler should issue warnings. Then you can lump all the unused functions together to avoid wasting parts of pages. Optimizing the library (find a good one) can be done to the same end. http://www.linuxlinks.com/Distributions/Mini_Distributions/ http://www.linuxrouter.org/ may give you some ideas. -- Robert> >
Reply by ●April 2, 20072007-04-02
On 2007-04-02, jeniffer <zenith.of.perfection@gmail.com> wrote:> 3. Is there any freeware tool that helps find unused functions > correctly by parsing some huge C/C++ source code?If you tell the compiler -ffunctions-section and then tell the linker --gc-sections, unused functions will be discarded. Adding the -fdata-sections to the compiler flags will do the same thing for variables. -- Grant Edwards grante Yow! .. the MYSTERIANS are at in here with my CORDUROY visi.com SOAP DISH!!
Reply by ●April 3, 20072007-04-03
On Apr 2, 5:08 pm, PoD <p...@internode.on.net> wrote:> On Mon, 02 Apr 2007 03:32:34 -0700, jeniffer wrote: > > I have a few questions aregarding size optimization : > > 1. I have already applied the linux kernel Tiny patch but I need to > > further reduce the size of the kernel.Any suggestions? > > 2. Is there a tool with low memory footprint to find out the dynamic > > memory usage of applications during runtime?Applications like > > iptables,ebtables etc that cannot be made to run in background? > > 3. Is there any freeware tool that helps find unused functions > > correctly by parsing some huge C/C++ source code? > > > Any suggestions would be welcome.Thanks. > > I've never used it but you might look athttp://sourceforge.net/projects/libraryopt/Thank you. But libraryopt is a tool to reduce the shared libraries by eliminating unused functions with respect to a set of binaries and not the binaries itself.
Reply by ●April 3, 20072007-04-03
On Apr 2, 6:31 pm, j...@franjam.org.uk (Jim Jackson) wrote:> In comp.arch.embedded jeniffer <zenith.of.perfect...@gmail.com> wrote: > > > 2. Is there a tool with low memory footprint to find out the dynamic > > memory usage of applications during runtime?Applications like > > iptables,ebtables etc that cannot be made to run in background? > > Why would you run the iptables program in the background? And what > difference to memory usage would it make? > > The iptables program simply loads configuration data into the kernel > to control the kernel's netfilter functions.Thanks a lot.I want to run iptables in the background (even for the time it takes to add a rule or display all chains) because I do a cat / proc/meminfo before the background application runs and while the application is running in the background to find out the RAM requirement. Iptables might use malloc etc ..Since it makes its own data structures before doing a final setsockopt() on the kernel,I think it would make difference to memory usage.
Reply by ●April 3, 20072007-04-03
On Apr 2, 6:56 pm, Robert Redelmeier <red...@ev1.net.invalid> wrote:> In comp.os.linux.development.system jeniffer <zenith.of.perfect...@gmail.com> wrote in part: > > > I have a few questions aregarding size optimization : > > 1. I have already applied the linux kernel Tiny patch but I need to > > further reduce the size of the kernel.Any suggestions? > > Use an older kernel. 2.4 uses less RAM than 2.6 . > > > 2. Is there a tool with low memory footprint to find out the dynamic > > memory usage of applications during runtime?Applications like > > iptables,ebtables etc that cannot be made to run in background? > > `ps` and `top` are the standards. They do multiple-count > shared usage (libs). > > > 3. Is there any freeware tool that helps find unused functions > > correctly by parsing some huge C/C++ source code? > > Your compiler should issue warnings. Then you can lump all > the unused functions together to avoid wasting parts of pages. > Optimizing the library (find a good one) can be done to > the same end. > > http://www.linuxlinks.com/Distributions/Mini_Distributions/http://www.linuxrouter.org/ > > may give you some ideas. > > -- Robert > >Thank u for ur input :) I cannot use 2.4 neither ps or top are supported. I would try the warnings part though
Reply by ●April 3, 20072007-04-03
In comp.arch.embedded jeniffer <zenith.of.perfection@gmail.com> wrote:> On Apr 2, 6:56 pm, Robert Redelmeier <red...@ev1.net.invalid> wrote: > >> `ps` and `top` are the standards. They do multiple-count >> shared usage (libs). > > I cannot use 2.4 neither ps or top are supported. I would try the > warnings part thoughWhat do you mean by 'not supported', compiling these tools for your platform can't be that hard ? -- :wq ^X^Cy^K^X^C^C^C^C