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

Bootmem allocator



Hi All,

I am trying to understand how the bootmem allocator is designed. I have the
following questions in the bootmem allocator.

1. Does it give memory in a sequential fashion in terms of pages or does it
allow any allocation of powers of 2 ?

2. Is only 1/8 th of the whole memory after "_end" given to bootmem
allocator, since in init_bootmem_core () there is something like
		mapsize = (( end - start) + 7)/8;

3. Does the function __alloc_bootmem_alloc () try to concatenate 2
subsequent allocations to avoid internal fragmentation ?

4. And what is the purpose of last_offset and last_pos fields in the
bootmem_data_t structure, I find that they are used only in
__alloc_bootmem_alloc () function.


Thanks in advance,
regards,
Supreeth.


-
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/
IRC Channel:   irc.openprojects.net / #kernelnewbies
Web Page:      http://www.kernelnewbies.org/