=== modified file 'src/fs/rock/RockSwapDir.cc' --- src/fs/rock/RockSwapDir.cc 2012-06-22 03:49:38 +0000 +++ src/fs/rock/RockSwapDir.cc 2012-08-01 17:16:40 +0000 @@ -18,6 +18,7 @@ #include "MemObject.h" #include "Parsing.h" #include "SquidMath.h" +#include #include const int64_t Rock::SwapDir::HeaderSize = 16*1024; === modified file 'src/ipc/Queue.cc' --- src/ipc/Queue.cc 2012-01-20 18:55:04 +0000 +++ src/ipc/Queue.cc 2012-08-01 17:16:40 +0000 @@ -51,7 +51,12 @@ Ipc::QueueReaders::QueueReaders(const int aCapacity): theCapacity(aCapacity) { Must(theCapacity > 0); - new (theReaders) QueueReader[theCapacity]; + theReaders=new QueueReader[theCapacity]; +} + +Ipc::QueueReaders::~QueueReaders() +{ + delete[] theReaders; } size_t === modified file 'src/ipc/Queue.h' --- src/ipc/Queue.h 2011-10-28 01:01:41 +0000 +++ src/ipc/Queue.h 2012-08-01 17:16:40 +0000 @@ -64,11 +64,16 @@ { public: QueueReaders(const int aCapacity); + ~QueueReaders(); size_t sharedMemorySize() const; static size_t SharedMemorySize(const int capacity); const int theCapacity; /// number of readers - QueueReader theReaders[]; /// readers + QueueReader *theReaders; /// readers +private: + QueueReaders(); //not implemented + QueueReaders& operator =(const QueueReaders&); //not implemented + QueueReaders(const QueueReaders&); //not implemented }; /** === modified file 'src/ipc/StoreMap.cc' --- src/ipc/StoreMap.cc 2012-01-20 18:55:04 +0000 +++ src/ipc/StoreMap.cc 2012-08-01 17:16:40 +0000 @@ -308,6 +308,12 @@ Ipc::StoreMap::Shared::Shared(const int aLimit, const size_t anExtrasSize): limit(aLimit), extrasSize(anExtrasSize), count(0) { + slots=new Slot[limit]; +} + +Ipc::StoreMap::Shared::~Shared() +{ + delete[] slots; } size_t === modified file 'src/ipc/StoreMap.h' --- src/ipc/StoreMap.h 2011-12-07 18:56:59 +0000 +++ src/ipc/StoreMap.h 2012-08-01 17:16:40 +0000 @@ -62,11 +62,16 @@ Shared(const int aLimit, const size_t anExtrasSize); size_t sharedMemorySize() const; static size_t SharedMemorySize(const int limit, const size_t anExtrasSize); + ~Shared(); const int limit; ///< maximum number of map slots const size_t extrasSize; ///< size of slot extra data Atomic::Word count; ///< current number of map slots - Slot slots[]; ///< slots storage + Slot *slots; ///< slots storage + private: + Shared(); //disabled + Shared &operator=(const Shared&); //disabled + Shared(const Shared&); //disabled }; public: === modified file 'src/ipc/mem/PageStack.cc' --- src/ipc/mem/PageStack.cc 2012-01-20 18:55:04 +0000 +++ src/ipc/mem/PageStack.cc 2012-08-01 18:23:02 +0000 @@ -23,6 +23,12 @@ // initially, all pages are free for (Offset i = 0; i < theSize; ++i) theItems[i] = i + 1; // skip page number zero to keep numbers positive + theItems=new Item[theSize]; +} + +Ipc::Mem::PageStack::~PageStack() +{ + delete[] theItems; } /* === modified file 'src/ipc/mem/PageStack.h' --- src/ipc/mem/PageStack.h 2011-10-28 01:01:41 +0000 +++ src/ipc/mem/PageStack.h 2012-08-01 18:23:01 +0000 @@ -25,6 +25,7 @@ typedef uint32_t Value; ///< stack item type (a free page number) PageStack(const uint32_t aPoolId, const unsigned int aCapacity, const size_t aPageSize); + ~PageStack(); unsigned int capacity() const { return theCapacity; } size_t pageSize() const { return thePageSize; } @@ -67,7 +68,7 @@ Atomic::WordT theFirstWritable; typedef Atomic::WordT Item; - Item theItems[]; ///< page number storage + Item *theItems; ///< page number storage }; } // namespace Mem