kmalloc before kmem_cache_init

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

 



I am kind of lost trying to figure out how can kmallocs work if they
are called before kmem_cache_init

(e.g. such a case occurs when in start_kernel() we call
parse_early_param() (which in turn might call
early_serial8250_setup() if earlycon= is used in kernel command-line)
before mm_init()  (which later calls
kmem_cache_init() )

>From what I understood, kmalloc() (SLUB implementation) first tries to
find out the slab fit for the size
being kmalloced and slabs are nothing but kmalloc_caches[]. Now these
kmalloc_caches get initialized in
kmem_cache_init().

What am I missing here ?

Regards,
Sukanto Ghosh


-- 
Regards,
Sukanto Ghosh

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies



[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