[uClinux-dev] How to know what's taking place in memory (new numbers)

David McCullough davidm at snapgear.com
Wed Nov 28 00:04:26 EST 2001


Jivin Fabrice Gautier lays it down ...
> > > > you should try a smaller one like simple-init.c from 
> 
> I really tried hard, my new init does { printf("hello\n"); while(1); } and
> its about 18k with uclibc.
> 
> And I got:
> 
> __alloc_pages: 3-order allocation failed (gfp=0x1f0/0) from 0201d110
> Allocation of length 24321 from process 1 failed
> Buffer memory:        0kB
> Free pages:         132kB (     0kB HighMem)
> ( Active: 0, inactive: 0, free: 33 )
> = 0kB)
> 1*4kB 2*8kB 1*16kB 1*32kB 1*64kB 0*128kB 0*256kB 0*512kB 0*1024kB 0*2048kB =
> 132kB)
> = 0kB)
> 
> This time the 24321 should fit easily either in the 32kb block or in the
> 64kb block. 


Doh,  for some reason I thought you were running 2.0 :-(  No wonder it
wasn't making sense ;-)

The problem is the way the page_allocator is setup in
linux-2.4.x/mmnommu/page_alloc.c.

Look in free_area_init_core around line 721 where it sets the values of:

	zone->pages_min = mask;
	zone->pages_low = mask * 2;
	zone->pages_high = mask * 3;

and change it to:

	zone->pages_min = 0;
	zone->pages_low = mask * 2;
	zone->pages_high = mask * 3;

So that you can get at all the memory regardless or who is asking for it.
You may have to play with these values a little if that doesn't work.

Cheers,
Davidm

-- 
David McCullough:    Ph: +61 7 3435 2815  http://www.SnapGear.com
davidm at snapgear.com  Fx: +61 7 3891 3630  825 Stanley St., W'gabba QLD 4102, Oz
This message resent by the uclinux-dev at uclinux.org list server http://www.uClinux.org/



More information about the uClinux-dev mailing list