[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: slab allocator
From: |
Johan Rydberg |
Subject: |
Re: slab allocator |
Date: |
Thu, 18 Sep 2003 13:04:18 +0200 |
Marcus Brinkmann <address@hidden> wrote:
: There are some internal names that are prefixed by hurd_ or __hurd_. This
: is not strictly necessary, but it's ok if you want to keep it that way.
I prefixed them with hurd or __hurd since they were global.
: One question I have: Why are slab spaces themselves managed with a slab?
: This makes sense to me if the slab allocator is the only one, but here the
: default allocator is malloc, and the slab allocator is used for many objects
: of the same type. I don't think we will have lots and lots of slab spaces
: dynamically created, so I think that just using malloc to allocate slab
: spaces would be fine. Of course, who knows what will happen. We might find
: lots of places to use such slab spaces, even dynamically, but I am not sure.
Actually, there is no need for doing that. But slab sapces are small objects
with a static size, for which the slab allocator is used. But you're right,
malloc could be used instead. That would eliminate the need for a init
function.
--
Johan Rydberg, Free Software Developer, Sweden
http://rtmk.sf.net | http://www.nongnu.org/guss/
Playing Plump DJs v.s. LFO - Low Frequency Bootilator