#
86c794e5 |
|
21-Jan-2010 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
slab allocator: * Implemented a more elaborated raw memory allocation backend (MemoryManager). We allocate 8 MB areas whose pages we allocate and map when needed. An area is divided into equally-sized chunks which form the basic units of allocation. We have areas with three possible chunk sizes (small, medium, large), which is basically what the ObjectCache implementations were using anyway. * Added "uint32 flags" parameter to several of the slab allocator's object cache and object depot functions. E.g. object_depot_store() potentially wants to allocate memory for a magazine. But also in pure freeing functions it might eventually become useful to have those flags, since they could end up deleting an area, which might not be allowable in all situations. We should introduce specific flags to indicate that. * Reworked the block allocator. Since the MemoryManager allocates block-aligned areas, maintains a hash table for lookup, and maps chunks to object caches, we can quickly find out which object cache a to be freed allocation belongs to and thus don't need the boundary tags anymore. * Reworked the slab boot strap process. We allocate from the initial area only when really necessary, i.e. when the object cache for the respective allocation size has not been created yet. A single page is thus sufficient. other: * vm_allocate_early(): Added boolean "blockAlign" parameter. If true, the semantics is the same as for B_ANY_KERNEL_BLOCK_ADDRESS. * Use an object cache for page mappings. This significantly reduces the contention on the heap bin locks. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35232 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
825566f8 |
|
19-Jan-2010 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
* Split the slab allocator code into separate source files and C++-ified things a bit. * Some style cleanup. * The object depot does now have a cookie that will be passed to the return hook. * Fixed object_cache_return_object_wrapper() using the new cookie. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35174 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
a8806e5e |
|
19-Jan-2010 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
* Renamed headers/private/kernel/slab/Depot.h to ObjectDepot.h. * Moved the object depot code to its own source file. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35161 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
a8f9741c |
|
04-Jul-2008 |
Michael Lotz <mmlr@mlotz.ch> |
* Removed -Wno-unused from all KernelMergeObjects in kernel Jamfiles. * Fixed most of the warnings resulting from that by removing actually not used variables or moving declaration into the #IF. Left unused functions there though, as I wouldn't know if they are supposed to be used again. * Fixed two statements with no effect (clamping to MAX_ANCILLARY_DATA_LEN in socket.cpp and unsetting fCounterSem in MessagingService.cpp). * Some style cleanups. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26253 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
6bad4934 |
|
28-Apr-2007 |
Hugo Santos <hugosantos@nowhere.fake> |
pushed the slab init a bit deeper. added a object cache based allocator, including a bootstrap mechanism to have it init during bootup. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20896 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
11b5020f |
|
28-Apr-2007 |
Hugo Santos <hugosantos@nowhere.fake> |
rewrote the object cache (slab) implementation a bit, preparing for further integration. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20887 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
8a96ba39 |
|
28-Apr-2007 |
Hugo Santos <hugosantos@nowhere.fake> |
some slab cleanups, split the C interface to another file. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20875 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
81423c91 |
|
25-Apr-2007 |
Hugo Santos <hugosantos@nowhere.fake> |
added initial slab code to the kernel. It is still unused, and there is still no VM interaction. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20832 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
86c794e5c10f1b2d99d672d424a8637639c703dd |
|
21-Jan-2010 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
slab allocator: * Implemented a more elaborated raw memory allocation backend (MemoryManager). We allocate 8 MB areas whose pages we allocate and map when needed. An area is divided into equally-sized chunks which form the basic units of allocation. We have areas with three possible chunk sizes (small, medium, large), which is basically what the ObjectCache implementations were using anyway. * Added "uint32 flags" parameter to several of the slab allocator's object cache and object depot functions. E.g. object_depot_store() potentially wants to allocate memory for a magazine. But also in pure freeing functions it might eventually become useful to have those flags, since they could end up deleting an area, which might not be allowable in all situations. We should introduce specific flags to indicate that. * Reworked the block allocator. Since the MemoryManager allocates block-aligned areas, maintains a hash table for lookup, and maps chunks to object caches, we can quickly find out which object cache a to be freed allocation belongs to and thus don't need the boundary tags anymore. * Reworked the slab boot strap process. We allocate from the initial area only when really necessary, i.e. when the object cache for the respective allocation size has not been created yet. A single page is thus sufficient. other: * vm_allocate_early(): Added boolean "blockAlign" parameter. If true, the semantics is the same as for B_ANY_KERNEL_BLOCK_ADDRESS. * Use an object cache for page mappings. This significantly reduces the contention on the heap bin locks. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35232 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
825566f82f652d82ffaf3f0deca0a2bcda1e02c2 |
|
19-Jan-2010 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
* Split the slab allocator code into separate source files and C++-ified things a bit. * Some style cleanup. * The object depot does now have a cookie that will be passed to the return hook. * Fixed object_cache_return_object_wrapper() using the new cookie. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35174 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
a8806e5e0dad28238343bd4dcc8d035657d358ff |
|
19-Jan-2010 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
* Renamed headers/private/kernel/slab/Depot.h to ObjectDepot.h. * Moved the object depot code to its own source file. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35161 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
a8f9741c8c2815234e87b78167738057b976b537 |
|
04-Jul-2008 |
Michael Lotz <mmlr@mlotz.ch> |
* Removed -Wno-unused from all KernelMergeObjects in kernel Jamfiles. * Fixed most of the warnings resulting from that by removing actually not used variables or moving declaration into the #IF. Left unused functions there though, as I wouldn't know if they are supposed to be used again. * Fixed two statements with no effect (clamping to MAX_ANCILLARY_DATA_LEN in socket.cpp and unsetting fCounterSem in MessagingService.cpp). * Some style cleanups. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26253 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
6bad4934393e784ea38685a76d28643deec67184 |
|
28-Apr-2007 |
Hugo Santos <hugosantos@nowhere.fake> |
pushed the slab init a bit deeper. added a object cache based allocator, including a bootstrap mechanism to have it init during bootup. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20896 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
11b5020f2fa2dcc510704cf3fb8dc9c3d3ea1f71 |
|
28-Apr-2007 |
Hugo Santos <hugosantos@nowhere.fake> |
rewrote the object cache (slab) implementation a bit, preparing for further integration. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20887 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
8a96ba39e3079d7c31898deb920496c101391d66 |
|
28-Apr-2007 |
Hugo Santos <hugosantos@nowhere.fake> |
some slab cleanups, split the C interface to another file. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20875 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
81423c91c784578220954adf9ed003575f8db8a0 |
|
25-Apr-2007 |
Hugo Santos <hugosantos@nowhere.fake> |
added initial slab code to the kernel. It is still unused, and there is still no VM interaction. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20832 a95241bf-73f2-0310-859d-f6bbb57e9c96
|