Re: kernel malloc() and free()

2010-03-02 Thread Andrey Simonenko
On Mon, Mar 01, 2010 at 09:24:40PM -0600, Dan Nelson wrote: Hm. Even after some reading, I'm not sure how the slabs keep track of which elements are allocated or free. I expected to find a bitmap somewhere that malloc() sets and free() clears, but I don't see it. Maybe some kernel hacker

kernel malloc() and free()

2010-03-01 Thread Shrivatsan
Hi, I am looking at the code that allocates and frees kernel memory. I understand that allocating kernel memory is quite different from the user level mallocs. In case of user level mallocs, we allocate requested size + 4 bytes and store the requested size in the additional 4 bytes.

Re: kernel malloc() and free()

2010-03-01 Thread Dan Nelson
In the last episode (Mar 01), Shrivatsan said: I am looking at the code that allocates and frees kernel memory. I understand that allocating kernel memory is quite different from the user level mallocs. In case of user level mallocs, we allocate requested size + 4 bytes and store the