Author: bonefish Date: 2011-07-06 22:23:42 +0200 (Wed, 06 Jul 2011) New Revision: 42385 Changeset: https://dev.haiku-os.org/changeset/42385 Ticket: https://dev.haiku-os.org/ticket/6237 Modified: haiku/trunk/src/system/kernel/slab/MemoryManager.cpp Log: MemoryManager::_GetChunks(): Fixed incorrect check. The area structure offset introduced in r37701 was not taken into account for computing the short meta chunk size. Fixes the reopened #6237. Modified: haiku/trunk/src/system/kernel/slab/MemoryManager.cpp =================================================================== --- haiku/trunk/src/system/kernel/slab/MemoryManager.cpp 2011-07-06 17:40:29 UTC (rev 42384) +++ haiku/trunk/src/system/kernel/slab/MemoryManager.cpp 2011-07-06 20:23:42 UTC (rev 42385) @@ -952,8 +952,10 @@ if (metaChunk == NULL) { // try to get a free meta chunk - if ((SLAB_CHUNK_SIZE_LARGE - kAreaAdminSize) / chunkSize >= chunkCount) + if ((SLAB_CHUNK_SIZE_LARGE - SLAB_AREA_STRUCT_OFFSET - kAreaAdminSize) + / chunkSize >= chunkCount) { metaChunk = sFreeShortMetaChunks.RemoveHead(); + } if (metaChunk == NULL) metaChunk = sFreeCompleteMetaChunks.RemoveHead();