Question about memorylocation of ramdisk

Dan Malek dan at
Tue Apr 10 04:18:56 EST 2001

Stefan Nunninger wrote:

> ..... Some time later the kernel
> uncompresses the ramdisk and places it right behind the kernel in
> memory. Thus the
> uncompressed ramdisk reaches from 0x7d000 up to 0x47d000. However
> this is clearly the location where the compressed ramdisk resides
> which will be overwritten before being uncompressed completely.

Not exactly....I _think_ it is supposed to work like this.

When the kernel starts up, it "allocates" the area occupied by
the compressed ram disk from it's available space before it does
anything else.  The uncompressed ram disk is then stuffed into
the file system buffer cache, which could be randomly scattered
about memory in buffer cache size blocks.  These blocks are marked
so they are always resident in the cache.  After this is done, the
compressed ram disk area is placed back into the free page pool.

> ...... I
> can not put the binary file into flash though as I have only 512kB
> of Flash available currently.

...and if you could, you will discover the ramdisk is copied to
RAM before the kernel is started.  This is because of the logic
I described above about the kernel returning this space to the
free page pool.  Pages of Flash in the page pool are not a good thing :-).

> ...... I assume this is
> due
> to the problem described above.

Probably not.  I use ramdisks greater than 4 MB quite often without
trouble.  Since this is a custom board, you may want to ensure you
don't have some memory related problems, like an incorrectly programmed
memory controller.  It could be that your access patterns across
some boundaries (like 4M or 8M or something) aren't actually to the
area of part you assume.

	-- Dan

** Sent via the linuxppc-embedded mail list. See

More information about the Linuxppc-embedded mailing list