LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Embedded & Single-board computer (https://www.linuxquestions.org/questions/linux-embedded-and-single-board-computer-78/)
-   -   Memory Issue in ARM 9 Embedded Linux. (https://www.linuxquestions.org/questions/linux-embedded-and-single-board-computer-78/memory-issue-in-arm-9-embedded-linux-4175445238/)

ashishbpatil123 01-12-2013 04:04 AM

Memory Issue in ARM 9 Embedded Linux.
 
I am writing an embedded application based on ARM 9 v5 processor, and using NAND of size 64 MB. My problem is that when I copied the text or binary files of sized 3-4 MB the free physical memory gets reduced by only few KB's, whereas ls -l show the file size in MB.

By repeating same process i reached one point where df command shows me 10 MB size is free and du show the total size 239MB.

how this can be happen as i have only 64MB of NAND how i am able to add files upto 239 MB of size.:banghead:

please reply. i need help to solve this problem.

Thank in advanced.

Mara 01-12-2013 02:00 PM

What filesystem are you using for your flash?

ashishbpatil123 01-14-2013 12:05 AM

We use JFFS2 File system.

rocq 01-17-2013 03:13 AM

Quote:

when I copied the text or binary files of sized 3-4 MB the free physical memory gets reduced by only few KB's, whereas ls -l show the file size in MB
Possibly this is because the file is cached and will actually be written later (reboot, interval, whatever). You can force writing to flash immediately with 'sync' (http://www.manpagez.com/man/8/sync/)

Quote:

By repeating same process i reached one point where df command shows me 10 MB size is free and du show the total size 239MB.
Take a look at your partition map: 'cat /proc/mtd'. What does that say? It is common for embedded systems to have a static partition map which the programmer has to provide at compile time.


All times are GMT -5. The time now is 04:38 PM.