------------------------------------------------------------ revno: 13921 revision-id: squid3@treenet.co.nz-20150924095936-rhv9czr20d36d9vk parent: squid3@treenet.co.nz-20150924052946-ao7gmp72lndssi1c author: Francesco Chemolli committer: Amos Jeffries branch nick: 3.5 timestamp: Thu 2015-09-24 02:59:36 -0700 message: Cleanup: Migrate StoreEntry to using MEMPROXY_CLASS ------------------------------------------------------------ # Bazaar merge directive format 2 (Bazaar 0.90) # revision_id: squid3@treenet.co.nz-20150924095936-rhv9czr20d36d9vk # target_branch: http://bzr.squid-cache.org/bzr/squid3/3.5 # testament_sha1: df831861d090ea5e5a19c31dbaa116973f5fed44 # timestamp: 2015-09-24 10:50:58 +0000 # source_branch: http://bzr.squid-cache.org/bzr/squid3/3.5 # base_revision_id: squid3@treenet.co.nz-20150924052946-\ # ao7gmp72lndssi1c # # Begin patch === modified file 'src/Store.h' --- src/Store.h 2015-08-29 20:11:19 +0000 +++ src/Store.h 2015-09-24 09:59:36 +0000 @@ -50,6 +50,8 @@ */ class StoreEntry : public hash_link { +public: + MEMPROXY_CLASS(StoreEntry); public: static DeferredRead::DeferrableRead DeferReader; @@ -184,8 +186,6 @@ return false; }; - void *operator new(size_t byteCount); - void operator delete(void *address); void setReleaseFlag(); #if USE_SQUID_ESI @@ -242,6 +242,8 @@ bool hasOneOfEtags(const String &reqETags, const bool allowWeakMatch) const; }; +MEMPROXY_CLASS_INLINE(StoreEntry); + std::ostream &operator <<(std::ostream &os, const StoreEntry &e); /// \ingroup StoreAPI === modified file 'src/store.cc' --- src/store.cc 2015-09-24 05:29:46 +0000 +++ src/store.cc 2015-09-24 09:59:36 +0000 @@ -144,24 +144,6 @@ fatal("Store::unlink on invalid Store\n"); } -void * -StoreEntry::operator new (size_t bytecount) -{ - assert (bytecount == sizeof (StoreEntry)); - - if (!pool) { - pool = memPoolCreate ("StoreEntry", bytecount); - } - - return pool->alloc(); -} - -void -StoreEntry::operator delete (void *address) -{ - pool->freeOne(address); -} - void StoreEntry::makePublic() { === modified file 'src/tests/stub_store.cc' --- src/tests/stub_store.cc 2015-01-13 09:13:49 +0000 +++ src/tests/stub_store.cc 2015-09-24 09:59:36 +0000 @@ -81,12 +81,6 @@ void StoreEntry::getPublicByRequestMethod(StoreClient * aClient, HttpRequest * request, const HttpRequestMethod& method) STUB void StoreEntry::getPublicByRequest(StoreClient * aClient, HttpRequest * request) STUB void StoreEntry::getPublic(StoreClient * aClient, const char *uri, const HttpRequestMethod& method) STUB -void *StoreEntry::operator new(size_t byteCount) -{ - STUB - return new StoreEntry(); -} -void StoreEntry::operator delete(void *address) STUB void StoreEntry::setReleaseFlag() STUB //#if USE_SQUID_ESI //ESIElement::Pointer StoreEntry::cachedESITree STUB_RETVAL(NULL)