From 340eed61d609dc977624c4590dd50909bccef3f6 Mon Sep 17 00:00:00 2001 From: Ingo Weinhold Date: Sun, 7 Sep 2003 12:04:24 +0000 Subject: [PATCH] Moved definition of _FreeBlock to the source file and enabled its "magic{1,2}" fields on debug only. git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4525 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- headers/os/support/BlockCache.h | 7 +------ src/kits/support/BlockCache.cpp | 7 +++++++ 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/headers/os/support/BlockCache.h b/headers/os/support/BlockCache.h index 7f8c5c331a..958951376b 100644 --- a/headers/os/support/BlockCache.h +++ b/headers/os/support/BlockCache.h @@ -58,12 +58,7 @@ private: BBlockCache(const BBlockCache &); BBlockCache &operator=(const BBlockCache &); - struct _FreeBlock - { - uint32 magic1; - _FreeBlock *next; - uint32 magic2; - }; + struct _FreeBlock; _FreeBlock *fFreeList; size_t fBlockSize; diff --git a/src/kits/support/BlockCache.cpp b/src/kits/support/BlockCache.cpp index d369b715aa..d905ca85cc 100644 --- a/src/kits/support/BlockCache.cpp +++ b/src/kits/support/BlockCache.cpp @@ -29,6 +29,13 @@ #define MAGIC1 0x9183f4d9 #define MAGIC2 0xa6b3c87d +struct BBlockCache::_FreeBlock { + DEBUG_ONLY( uint32 magic1; ) + _FreeBlock *next; + DEBUG_ONLY( uint32 magic2; ) +}; + + // The requirements set by the BeBook's description of the destructor, // as well as Get() function, allowing the caller to dispose of the // memory, do not allow to allocate one large block to be used as pool.