[uClinux-dev] How to know what's taking place in memory

Fabrice Gautier Fabrice_Gautier at sdesigns.com
Tue Nov 27 17:39:39 EST 2001


I'm trying to run uClinux on my Atmel board with only 1Meg of RAM and it
fails to load busybox (not enough memory it seems)

However i don't really understand the figures that the kernel display.

At the beggining I have this message:
Memory: 1MB = 1MB total
Memory: 304KB available (388K code, 150K data, 28K init)

If I do 304 + 388 + 150 + 28, i'm far from the 1mb total. What does thsi
figures really mean?

So at this point I have 304 K free. My /bin/sh is busybox which is about 87
k (cd text + data +bss).

when it try to load it it fails with:

__alloc_pages: 5-order allocation failed (gfp=0x1f0/0) from 0201d110
Allocation of length 91363 from process 1 failed
Buffer memory:        0kB
Free pages:         132kB (     0kB HighMem)
( Active: 0, inactive: 0, free: 33 )
= 0kB)
3*4kB 3*8kB 0*16kB 1*32kB 1*64kB 0*128kB 0*256kB 0*512kB 0*1024kB 0*2048kB =
13)= 0kB)

So at this point i have only 132KB left. First question, who took those 384
- 132 KB? Is it possible to reduce this?

Anyway with 132 KB i should have enough memory to load the 91363 bytes. But
it seems that the memory is already fragmented so that the bigest available
page is 64 kb.

This mean that some part of the kernel is allocating and freeing memory
before init.
Is there any part of the kernel I should look for that? I'm wondering why
there is so much memory wasted...

Fabrice Gautier, 
Fabrice_Gautier at sdesigns.com

Fabrice Gautier
Software Engineer, Sigma Designs
Fabrice_Gautier at sdesigns.com

This message resent by the uclinux-dev at uclinux.org list server http://www.uClinux.org/

More information about the uClinux-dev mailing list