Forum Discussion
Altera_Forum
Honored Contributor
20 years agohelp me,save my memory
hi!
my application use more memory in the nios than arm platform I use the objdump print as follow: [root@localhost pppd]# nios2-elf-objdump --header pppd_dump.elf pppd_dump.elf: file format elf32-littlenios2 Sections: Idx Name Size VMA LMA File off Algn 0 .text 00023bf0 00000000 00000000 00000034 2**2 CONTENTS, ALLOC, LOAD, RELOC, READONLY, CODE 1 .data 000071c8 00023bf0 00023bf0 00023c24 2**2 CONTENTS, ALLOC, LOAD, RELOC, DATA, SMALL_DATA 2 .bss 0001bf54 0002adb8 0002adb8 0002adec 2**2 ALLOC 3 .comment 00000630 00000000 00000000 0002adec 2**0 CONTENTS, READONLY 4 .debug_aranges 00000460 00000000 00000000 0002b41c 2**0 CONTENTS, RELOC, READONLY, DEBUGGING 5 .debug_pubnames 000014bb 00000000 00000000 0002b87c 2**0 CONTENTS, RELOC, READONLY, DEBUGGING 6 .debug_info 00012a78 00000000 00000000 0002cd37 2**0 CONTENTS, RELOC, READONLY, DEBUGGING 7 .debug_abbrev 00003af3 00000000 00000000 0003f7af 2**0 CONTENTS, READONLY, DEBUGGING 8 .debug_line 00013bc5 00000000 00000000 000432a2 2**0 CONTENTS, RELOC, READONLY, DEBUGGING 9 .debug_frame 00002150 00000000 00000000 00056e68 2**2 CONTENTS, RELOC, READONLY, DEBUGGING 10 .debug_str 00009385 00000000 00000000 00058fb8 2**0 CONTENTS, READONLY, DEBUGGING 11 .debug_ranges 00000998 00009385 00009385 0006233d 2**0 CONTENTS, READONLY, DEBUGGING [root@localhost pppd]# arm-elf-objdump --header pppd.gdb pppd.gdb: file format elf32-littlearm Sections: Idx Name Size VMA LMA File off Algn 0 .text 00024c20 00000000 00000000 00008000 2**4 CONTENTS, ALLOC, LOAD, READONLY, CODE 1 .data 00006bc0 00024c20 00024c20 0002cc20 2**4 CONTENTS, ALLOC, LOAD, DATA 2 .bss 0000a1c0 0002b7e0 0002b7e0 000337e0 2**4 ALLOC 3 .debug_abbrev 00014bc3 00000000 00000000 000337e0 2**0 CONTENTS, READONLY, DEBUGGING 4 .debug_info 002985c5 00000000 00000000 000483a3 2**0 CONTENTS, READONLY, DEBUGGING 5 .debug_line 0005f85c 00000000 00000000 002e0968 2**0 CONTENTS, READONLY, DEBUGGING 6 .debug_pubnames 0000373a 00000000 00000000 003401c4 2**0 CONTENTS, READONLY, DEBUGGING 7 .debug_aranges 00001c80 00000000 00000000 003438fe 2**0 CONTENTS, READONLY, DEBUGGING Thank you for all response!16 Replies
- Altera_Forum
Honored Contributor
And Can you tell me how to reuce the slack space?
Thanks! - Altera_Forum
Honored Contributor
--- Quote Start --- originally posted by smalllight@Apr 10 2006, 03:26 PM hi,hippo!i build the boa in the arm platform,the message boa process is as follow:# cat status
name: boa
state: s (sleeping)
tgid: 60
pid: 60
ppid: 56
tracerpid: 0
uid: 0 0 0 0
gid: 0 0 0 0
fdsize: 32
groups:
mem: 157792 bytes
slack: 2876 bytes
shared: 0 bytes
sigpnd: 0000000000000000
sigblk: 0000000000000000
sigign: 0000000000001a00
sigcgt: 0000000000016443
capinh: 0000000000000000
capprm: 00000000fffffeff
capeff: 00000000fffffeff
can you show the boa process status in your nios platform?
<div align='right'><{post_snapback}> (index.php?act=findpost&pid=14187)
--- quote end ---
--- Quote End --- Sorry for the delay, I was busy on a kernel issue. Here is boa status on nios2 # cat status Name: boa State: S (sleeping) SleepAVG: 87% Tgid: 28 Pid: 28 PPid: 26 TracerPid: 0 Uid: 0 0 0 0 Gid: 0 0 0 0 FDSize: 32 Groups: Mem: 286112 bytes Slack: 52682 bytes Shared: 0 bytes Threads: 1 SigPnd: 0000000000000000 ShdPnd: 0000000000000000 SigBlk: 0000000000000000 SigIgn: 0000000000001004 SigCgt: 0000000000014643 CapInh: 0000000000000000 CapPrm: 00000000fffffeff CapEff: 00000000fffffeff#
- Altera_Forum
Honored Contributor
Dear Hippo,
We build our boa application in our platform! we list the status. and could you please send us you code of boa ,then we can compare them, our boa version 0.94# cat /proc/108/status Name: boa State: S (sleeping) SleepAVG: 89% Tgid: 108 Pid: 108 PPid: 89 TracerPid: 0 Uid: 0 0 0 0 Gid: 0 0 0 0 FDSize: 32 Groups: Mem: 273568 bytes Slack: 71494 bytes Shared: 0 bytes Threads: 1 SigPnd: 0000000000000000 ShdPnd: 0000000000000000 SigBlk: 0000000000000000 SigIgn: 0000000000001004 SigCgt: 0000000000016643 CapInh: 0000000000000000 CapPrm: 00000000fffffeff CapEff: 00000000fffffeff Best Regards, Fei WU e-mail: [email protected] - Altera_Forum
Honored Contributor
--- Quote Start --- originally posted by feiwu@Apr 13 2006, 10:51 AM dear hippo,we build our boa application in our platform! we list the status.
and could you please send us you code of boa ,then we can compare them,
our boa version 0.94# cat /proc/108/status
name: boa
state: s (sleeping)
sleepavg: 89%
tgid: 108
pid: 108
ppid: 89
tracerpid: 0
uid: 0 0 0 0
gid: 0 0 0 0
fdsize: 32
groups:
mem: 273568 bytes
slack: 71494 bytes
shared: 0 bytes
threads: 1
sigpnd: 0000000000000000
shdpnd: 0000000000000000
sigblk: 0000000000000000
sigign: 0000000000001004
sigcgt: 0000000000016643
capinh: 0000000000000000
capprm: 00000000fffffeff
capeff: 00000000fffffeff
best regards,
fei wu
e-mail: [email protected]
<div align='right'><{post_snapback}> (index.php?act=findpost&pid=14297)
--- quote end ---
--- Quote End --- it was in ~/apps/boa, which was ported by Microtronix.
- Altera_Forum
Honored Contributor
Dear hippo!
I compare the status of boa process in your platform and my arm platform. the result as follow: my arm platform: compare Mem: 157792 bytes Slack: 2876 bytes Shared: 0 bytes your nios platform: Mem: 286112 bytes Slack: 52682 bytes Shared: 0 bytes you can see nios plat forum user more memory than arm. In my arm platform, the linux sourse verision is 2.4 if the application will consume more memory in the 2.6 kernel? can you help me? - Altera_Forum
Honored Contributor
--- Quote Start --- originally posted by smalllight@Apr 17 2006, 11:05 AM dear hippo!i compare the status of boa process in your platform and my arm platform.
the result as follow:
my arm platform:
compare
mem: 157792 bytes
slack: 2876 bytes
shared: 0 bytes
your nios platform:
mem: 286112 bytes
slack: 52682 bytes
shared: 0 bytes
you can see nios plat forum user more memory than arm.
in my arm platform, the linux sourse verision is 2.4
if the application will consume more memory in the 2.6 kernel?
can you help me?
<div align='right'><{post_snapback}> (index.php?act=findpost&pid=14414)
--- quote end ---
--- Quote End --- I would expect Nios2's code efficency will not be as good as ARM's. Because Nios2 has fewer instruction set. To reduce memory usage, there are some approaches. 1. rebuild the lib and code with "-Os" flag. 2. in Linux 2.6.12 or later, there is a CONFIG_BASE_SMALL, which will use smaller table size for kernel data. 3. hack the kernel or apps to reduce memory usage and slack.