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
Is it possible that applications in Linux 2.6 need more memory than those did in Linux 2.4? Could someone figue out in detail?
- Altera_Forum
Honored Contributor
Please try the build tools as in the thread and compare the result,
http://forum.niosforum.com/forum/index.php?showtopic=3174 (http://forum.niosforum.com/forum/index.php?showtopic=3174) Sorry, I didn't have better idea. - Altera_Forum
Honored Contributor
Hi Hippo,
We do use the nios2 cross compiler tools according to your buildroot POST. But the size of the applications(pppd) code and its size in SDRAM all more bigger than arm+ linux2.4.x. Could your give your applications(pppd) parameters? Such as using cat pid/status and objdump . - Altera_Forum
Honored Contributor
Hi smalllight,
> 2 .bss 0001bf54 0002adb8 0002adb8 0002adec 2**2 > 2 .bss 0000a1c0 0002b7e0 0002b7e0 000337e0 2**4 Your uninitialized data for Nios-II is more than twice the size for ARM. Everything else is reasonable. You need to compare your linker maps to isolate the culprit -- otherwise, it's just speculation. Regards, --Scott - Altera_Forum
Honored Contributor
--- Quote Start --- originally posted by mountain8848@Mar 29 2006, 05:22 PM hi hippo,we do use the nios2 cross compiler tools according to your buildroot post.
but the size of the applications(pppd) code and its size in sdram all more bigger than arm+ linux2.4.x.
could your give your applications(pppd) parameters? such as using cat pid/status and objdump .
<div align='right'><{post_snapback}> (index.php?act=findpost&pid=13893)
--- quote end ---
--- Quote End --- The code size of nios2 may be a little bigger than arm. But smalllight's problem is that it take many times of that of arm when in sdram. He said all appliactions has this problem. Sound like memory leakage. I didn't use arm linux, so I don't know the differences. I didn't build pppd, but I checked boa, and it seem OK. What is your memory profile before and after loading an apps? with "cat /proc/meminfo" or "free" . We also check with "cat /proc/<apps pid>/status" .
- Altera_Forum
Honored Contributor
I didn't have better idea.
would you try out boa? what is the free mem before and after "boa &" ? - Altera_Forum
Honored Contributor
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? - Altera_Forum
Honored Contributor
Who can tell me what the "slack" is? what does it mean?
Best Regards, Fei Wu - Altera_Forum
Honored Contributor
--- Quote Start --- originally posted by feiwu@Apr 10 2006, 07:16 PM who can tell me what the "slack" is? what does it mean?best regards,
fei wu
<div align='right'><{post_snapback}> (index.php?act=findpost&pid=14190)
--- quote end ---
--- Quote End --- slack is the wasted space in memory management. eg, if you want 6K, but kernel give you 8K, then 2K is wasted.
- Altera_Forum
Honored Contributor
I think the same as what you said!
Thank you very much! Best Regards, Fei Wu