Dear Ravi, Sorry my multiplied postings! Thx for Your answer! On 11 Sep 2002 at 7:50, Ravi wrote: > > I try to use kmalloc in a kernel patch (Not in a module! It is > > compiled to the kernel). It is called at the very beginningof the > > boot process. > > <snip> > > > But when I compile these lines, the boot process freezes. Does anyone > > have any idea why??? Am I trying to allocate memory too early in the boot > > process? > > It does appear so. For kmalloc() to work, kmem_cache_init() should > have been executed. Also, platform specific pagetable initialization > should have been done. > > If you have to allocate memory earlier, use the bootmem allocator > (alloc_bootmem()). THX! If I need non-cached memory should I do something if I try to use the alloc_bootmem() funciton? I mean allocating memory by __get_free_page() I have to set PAGE_NO_CACHE bit. TIA && Good byte! -- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/