Re: kmalloc freeze

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





> 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()).
 
-Ravi.

__________________________________________________
Yahoo! - We Remember
9-11: A tribute to the more than 3,000 lives lost
http://dir.remember.yahoo.com/tribute
--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux