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. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42385 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -952,8 +952,10 @@ MemoryManager::_GetChunks(MetaChunkList* metaChunkList, size_t chunkSize,
|
|||||||
|
|
||||||
if (metaChunk == NULL) {
|
if (metaChunk == NULL) {
|
||||||
// try to get a free meta chunk
|
// 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();
|
metaChunk = sFreeShortMetaChunks.RemoveHead();
|
||||||
|
}
|
||||||
if (metaChunk == NULL)
|
if (metaChunk == NULL)
|
||||||
metaChunk = sFreeCompleteMetaChunks.RemoveHead();
|
metaChunk = sFreeCompleteMetaChunks.RemoveHead();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user