]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Cleanup: update several CBDATA classes part 2
authorAmos Jeffries <squid3@treenet.co.nz>
Thu, 27 Jun 2013 15:58:46 +0000 (09:58 -0600)
committerAmos Jeffries <squid3@treenet.co.nz>
Thu, 27 Jun 2013 15:58:46 +0000 (09:58 -0600)
Removes several cbdataAlloc/cbdataFree by updating classes to use
CBDATA_CLASS2 macro..

32 files changed:
src/ClientRequestContext.h
src/DiskIO/AIO/AIODiskFile.cc
src/DiskIO/AIO/AIODiskFile.h
src/DiskIO/Blocking/BlockingFile.cc
src/DiskIO/Blocking/BlockingFile.h
src/DiskIO/DiskDaemon/DiskdFile.cc
src/DiskIO/DiskDaemon/DiskdFile.h
src/DiskIO/DiskThreads/DiskThreadsDiskFile.cc
src/DiskIO/DiskThreads/DiskThreadsDiskFile.h
src/DiskIO/Mmapped/MmappedFile.cc
src/DiskIO/Mmapped/MmappedFile.h
src/ExternalACLEntry.cc
src/ExternalACLEntry.h
src/PeerDigest.h
src/StoreClient.h
src/client_side.cc
src/client_side.h
src/client_side_reply.cc
src/client_side_reply.h
src/client_side_request.cc
src/client_side_request.h
src/esi/Context.h
src/esi/Esi.cc
src/esi/Include.cc
src/esi/Include.h
src/fs/coss/store_coss.h
src/fs/coss/store_io_coss.cc
src/fs/ufs/UFSStoreState.cc
src/fs/ufs/UFSStoreState.h
src/peer_digest.cc
src/store_client.cc
src/tests/stub_client_side.cc

index 5c98f6f271462c07fff705aa61f749a75ca993eb..3d3c0eb86750eeb5b0029373676f10d7c31e3e44 100644 (file)
@@ -20,9 +20,6 @@ class ClientRequestContext : public RefCountable
 {
 
 public:
-    void *operator new(size_t);
-    void operator delete(void *);
-
     ClientRequestContext(ClientHttpRequest *);
     ~ClientRequestContext();
 
@@ -87,7 +84,7 @@ public:
     bool readNextRequest; ///< whether Squid should read after error handling
 
 private:
-    CBDATA_CLASS(ClientRequestContext);
+    CBDATA_CLASS2(ClientRequestContext);
 };
 
 #endif /* SQUID_CLIENTREQUESTCONTEXT_H */
index fe49b6c97901852a684f6871fd6ca7769dd36b6c..7a4b9df4ab19bbaae158d5a704834a934e6a76ac 100644 (file)
 #endif
 
 CBDATA_CLASS_INIT(AIODiskFile);
-void *
-AIODiskFile::operator new(size_t unused)
-{
-    CBDATA_INIT_TYPE(AIODiskFile);
-    return cbdataAlloc(AIODiskFile);
-}
-
-void
-AIODiskFile::operator delete(void *address)
-{
-    cbdataFree(address);
-}
 
 AIODiskFile::AIODiskFile(char const *aPath, AIODiskIOStrategy *aStrategy) : fd(-1), closed(true), error_(false)
 {
index fe5ab9b5465f72c208d5bc4846f2fe6acd9a6211..15e052c177f299733704ebc167f903e4ab32f9de 100644 (file)
@@ -46,8 +46,6 @@ class AIODiskFile : public DiskFile
 public:
 
     friend class AIODiskIOStrategy;
-    void * operator new (size_t);
-    void operator delete (void *);
     AIODiskFile (char const *path, AIODiskIOStrategy *);
     ~AIODiskFile();
 
@@ -77,7 +75,7 @@ private:
     RefCount<IORequestor> ioRequestor;
     bool closed;
     bool error_;
-    CBDATA_CLASS(AIODiskFile);
+    CBDATA_CLASS2(AIODiskFile);
 };
 
 #endif /* USE_DISKIO_AIO */
index fcc29ff1a8558ce96f3ac2e8be183e87c0c22754..d44dde48f18b86bb4ca8f78c375144851e9ea042 100644 (file)
 #if HAVE_ERRNO_H
 #include <errno.h>
 #endif
-CBDATA_CLASS_INIT(BlockingFile);
-
-void *
-BlockingFile::operator new(size_t sz)
-{
-    CBDATA_INIT_TYPE(BlockingFile);
-    BlockingFile *result = cbdataAlloc(BlockingFile);
-    /* Mark result as being owned - we want the refcounter to do the delete
-     * call */
-    return result;
-}
 
-void
-BlockingFile::operator delete(void *address)
-{
-    BlockingFile *t = static_cast<BlockingFile *>(address);
-    cbdataFree(t);
-}
+CBDATA_CLASS_INIT(BlockingFile);
 
 BlockingFile::BlockingFile(char const *aPath) : fd (-1), closed (true), error_(false)
 {
index 59213788b9a8e283a9b0b5cf58c898c17fed5641..7ad857b9c66c8b23d4117a3e296d1be41ca6958c 100644 (file)
@@ -42,8 +42,6 @@ class BlockingFile : public DiskFile
 {
 
 public:
-    void *operator new(size_t);
-    void operator delete(void *);
     BlockingFile(char const *path);
     ~BlockingFile();
     virtual void open(int flags, mode_t mode, RefCount<IORequestor> callback);
@@ -72,7 +70,7 @@ private:
     void readDone(int fd, const char *buf, int len, int errflag);
     void writeDone(int fd, int errflag, size_t len);
 
-    CBDATA_CLASS(BlockingFile);
+    CBDATA_CLASS2(BlockingFile);
 };
 
 #endif /* SQUID_BLOCKINGFILE_H */
index 1a992482027fb99ff59d1b78dd37f3681c698429..4120b37e986c90662865d3fa0542e4deac5ca5a4 100644 (file)
 
 CBDATA_CLASS_INIT(DiskdFile);
 
-void *
-DiskdFile::operator new(size_t unused)
-{
-    CBDATA_INIT_TYPE(DiskdFile);
-    DiskdFile *result = cbdataAlloc(DiskdFile);
-    /* Mark result as being owned - we want the refcounter to do the delete
-     * call */
-    debugs(79, 3, "diskdFile with base " << result << " allocating");
-    return result;
-}
-
-void
-DiskdFile::operator delete(void *address)
-{
-    DiskdFile *t = static_cast<DiskdFile *>(address);
-    debugs(79, 3, "diskdFile with base " << t << " deleting");
-    cbdataFree(t);
-}
-
 DiskdFile::DiskdFile(char const *aPath, DiskdIOStrategy *anIO) :
         errorOccured(false),
         IO(anIO),
index e30374f1c0d926a89e4ba3cb669e8473921adab9..a3a3d0b9c8ea7a6eff4c0007a61406de9ff5e34b 100644 (file)
@@ -48,8 +48,6 @@ class DiskdFile : public DiskFile
 {
 
 public:
-    void * operator new(size_t);
-    void operator delete(void *);
     DiskdFile(char const *path, DiskdIOStrategy *);
     ~DiskdFile();
     virtual void open(int flags, mode_t aMode, RefCount<IORequestor> callback);
@@ -84,7 +82,7 @@ private:
     void ioCompleted();
     size_t inProgressIOs;
 
-    CBDATA_CLASS(DiskdFile);
+    CBDATA_CLASS2(DiskdFile);
 };
 
 #endif
index 95bc9569fe4f973c6abc9d22fe5eceb58a316d7f..dca393085053f9edd1f2b8f167e544f2f5d23cf9 100644 (file)
 /* === PUBLIC =========================================================== */
 
 CBDATA_CLASS_INIT(DiskThreadsDiskFile);
-void *
-DiskThreadsDiskFile::operator new (size_t)
-{
-    CBDATA_INIT_TYPE(DiskThreadsDiskFile);
-    DiskThreadsDiskFile *result = cbdataAlloc(DiskThreadsDiskFile);
-    /*
-     * We used to call squidaio_init() here, but if the first transaction
-     * is to unlink a file (e.g., if Squid starts up over the disk space
-     * limit) then "squidaio" won't be initialized yet.
-     */
-
-    return result;
-}
-
-void
-DiskThreadsDiskFile::operator delete(void *address)
-{
-    DiskThreadsDiskFile *t = static_cast<DiskThreadsDiskFile *>(address);
-    cbdataFree(t);
-}
 
 DiskThreadsDiskFile::DiskThreadsDiskFile(char const *aPath, DiskThreadsIOStrategy *anIO):fd(-1), errorOccured (false), IO(anIO),
         inProgressIOs (0)
index 5b94023100f0dc1497c98ab1d1177f3400e51c82..01b86ca6724bf8e8ddf8ddaed6d2440167b51c21 100644 (file)
@@ -41,8 +41,6 @@ class DiskThreadsDiskFile : public DiskFile
 {
 
 public:
-    void * operator new(size_t);
-    void operator delete(void *);
     DiskThreadsDiskFile(char const *path, DiskThreadsIOStrategy *);
     ~DiskThreadsDiskFile();
     virtual void open(int flags, mode_t mode, RefCount<IORequestor> callback);
@@ -86,7 +84,7 @@ private:
     void readDone(int fd, const char *buf, int len, int errflag, RefCount<ReadRequest> request);
     void writeDone(int fd, int errflag, size_t len, RefCount<WriteRequest> request);
 
-    CBDATA_CLASS(DiskThreadsDiskFile);
+    CBDATA_CLASS2(DiskThreadsDiskFile);
 };
 
 #include "DiskIO/ReadRequest.h"
index 82a4d68b52373f64422eec314a740975db4df977..314c934bdab6b4eadef34933f0980609701601d1 100644 (file)
@@ -49,23 +49,6 @@ private:
     void *buf; ///< buffer returned by mmap, needed for munmap
 };
 
-void *
-MmappedFile::operator new(size_t sz)
-{
-    CBDATA_INIT_TYPE(MmappedFile);
-    MmappedFile *result = cbdataAlloc(MmappedFile);
-    /* Mark result as being owned - we want the refcounter to do the delete
-     * call */
-    return result;
-}
-
-void
-MmappedFile::operator delete(void *address)
-{
-    MmappedFile *t = static_cast<MmappedFile *>(address);
-    cbdataFree(t);
-}
-
 MmappedFile::MmappedFile(char const *aPath): fd(-1),
         minOffset(0), maxOffset(-1), error_(false)
 {
index 128ea3c6df70dbe90deaa7e720377227d8d2f08c..c15871e086ccc299c0a51dfcb3848fc1c0d32aa4 100644 (file)
@@ -9,8 +9,6 @@ class MmappedFile : public DiskFile
 {
 
 public:
-    void *operator new(size_t);
-    void operator delete(void *);
     MmappedFile(char const *path);
     ~MmappedFile();
     virtual void open(int flags, mode_t mode, RefCount<IORequestor> callback);
@@ -40,7 +38,7 @@ private:
 
     void doClose();
 
-    CBDATA_CLASS(MmappedFile);
+    CBDATA_CLASS2(MmappedFile);
 };
 
 #endif /* SQUID_MMAPPEDFILE_H */
index 789b06eeec7149959bb058ded5be744a48a01b8b..9925320cdec68a0f274e3ffdc0397856bd2bdf64 100644 (file)
 
 CBDATA_CLASS_INIT(ExternalACLEntry);
 
-void *
-ExternalACLEntry::operator new (size_t byteCount)
-{
-    /* derived classes with different sizes must implement their own new */
-    assert (byteCount == sizeof (ExternalACLEntry));
-    CBDATA_INIT_TYPE(ExternalACLEntry);
-    return cbdataAlloc(ExternalACLEntry);
-}
-
-void
-ExternalACLEntry::operator delete (void *address)
-{
-    cbdataFree (address);
-}
-
 ExternalACLEntry::ExternalACLEntry()
 {
     lru.next = lru.prev = NULL;
index b26d094fa423a171985050715116bc13b2c624fc..47d713811076e71ed9cdeabb3f9f1f9716e5de0e 100644 (file)
@@ -81,9 +81,6 @@ class ExternalACLEntry: public hash_link
 {
 
 public:
-    void *operator new (size_t bytesToAllocate);
-    void operator delete (void *address);
-
     ExternalACLEntry();
     ~ExternalACLEntry();
 
@@ -101,7 +98,7 @@ public:
     external_acl *def;
 
 private:
-    CBDATA_CLASS(ExternalACLEntry);
+    CBDATA_CLASS2(ExternalACLEntry);
 };
 
 typedef class ExternalACLEntry external_acl_entry;
index 189a861583e633018718cfd147dd78a69fe44def..5823685a5cc4e27dd243bff489cb19bfb9580b93 100644 (file)
@@ -95,9 +95,6 @@ class PeerDigest
 {
 
 public:
-    void *operator new (size_t);
-    void operator delete(void *);
-
     CachePeer *peer;          /**< pointer back to peer structure, argh */
     CacheDigest *cd;            /**< actual digest structure */
     String host;                /**< copy of peer->host */
@@ -132,7 +129,7 @@ public:
     } stats;
 
 private:
-    CBDATA_CLASS(PeerDigest);
+    CBDATA_CLASS2(PeerDigest);
 };
 
 extern const Version CacheDigestVer;
index 9264c6fd7442bcc1da8d93c5f0a8d014f2b2ad9e..3b3ef8776228ceba022a9fcdc241af651b14a1e7 100644 (file)
@@ -59,8 +59,6 @@ class store_client
 {
 
 public:
-    void *operator new (size_t);
-    void operator delete (void *);
     store_client(StoreEntry *);
     ~store_client();
     bool memReaderHasLowerOffset(int64_t) const;
@@ -122,7 +120,7 @@ public:
     } _callback;
 
 private:
-    CBDATA_CLASS(store_client);
+    CBDATA_CLASS2(store_client);
 };
 
 void storeClientCopy(store_client *, StoreEntry *, StoreIOBuffer, STCB *, void *);
index 3d2e653fc498d2e792d7312bfce0634709d4b8d3..dbe8031626dbcf2eef9038f7e4277908e2baa2ef 100644 (file)
@@ -193,21 +193,6 @@ static void clientListenerConnectionOpened(AnyP::PortCfg *s, const Ipc::FdNoteId
 
 CBDATA_CLASS_INIT(ClientSocketContext);
 
-void *
-ClientSocketContext::operator new (size_t byteCount)
-{
-    /* derived classes with different sizes must implement their own new */
-    assert (byteCount == sizeof (ClientSocketContext));
-    CBDATA_INIT_TYPE(ClientSocketContext);
-    return cbdataAlloc(ClientSocketContext);
-}
-
-void
-ClientSocketContext::operator delete (void *address)
-{
-    cbdataFree (address);
-}
-
 /* Local functions */
 /* ClientSocketContext */
 static ClientSocketContext *ClientSocketContextNew(const Comm::ConnectionPointer &clientConn, ClientHttpRequest *);
index a10e0b0caf63c56a6aeaf3c279bd97d86d865f69..89ad23fddb9a5f24210d5b4d4a54e89ca12dba6a 100644 (file)
@@ -83,8 +83,6 @@ class ClientSocketContext : public RefCountable
 
 public:
     typedef RefCount<ClientSocketContext> Pointer;
-    void *operator new(size_t);
-    void operator delete(void *);
     ClientSocketContext();
     ~ClientSocketContext();
     bool startOfOutput() const;
@@ -159,7 +157,7 @@ private:
     bool mayUseConnection_; /* This request may use the connection. Don't read anymore requests for now */
     bool connRegistered_;
 
-    CBDATA_CLASS(ClientSocketContext);
+    CBDATA_CLASS2(ClientSocketContext);
 };
 
 class ConnectionDetail;
index f4758c61c7f102e32d0bebb295405fde723975bf..297569de6c7628c669410439a0d612fa9427b87d 100644 (file)
@@ -171,22 +171,6 @@ clientReplyContext::removeClientStoreReference(store_client **scp, ClientHttpReq
     aHttpRequest->storeEntry(reference);
 }
 
-void *
-clientReplyContext::operator new (size_t byteCount)
-{
-    /* derived classes with different sizes must implement their own new */
-    assert (byteCount == sizeof (clientReplyContext));
-    CBDATA_INIT_TYPE(clientReplyContext);
-    return cbdataAlloc(clientReplyContext);
-}
-
-void
-clientReplyContext::operator delete (void *address)
-{
-    clientReplyContext * tmp = (clientReplyContext *)address;
-    cbdataFree (tmp);
-}
-
 void
 clientReplyContext::saveState()
 {
index 18dec5efe7df2278f4683c6cb3e7af64df8b35bf..15a34fe0de9d57236973d19543ba576a0b5691f5 100644 (file)
@@ -44,8 +44,6 @@ class clientReplyContext : public RefCountable, public StoreClient
 {
 
 public:
-    void *operator new (size_t byteCount);
-    void operator delete (void *address);
     static STCB CacheHit;
     static STCB HandleIMSReply;
     static STCB SendMoreData;
@@ -152,7 +150,7 @@ private:
     store_client *old_sc;      /* ... for entry to be validated */
     bool deleting;
 
-    CBDATA_CLASS(clientReplyContext);
+    CBDATA_CLASS2(clientReplyContext);
 };
 
 #endif /* SQUID_CLIENTSIDEREPLY_H */
index 0b9d5cfd30ea312a6a93126a3748bcd6fc58afd4..092aa39fe761c748523fb2838edc3496b28b2dd5 100644 (file)
@@ -107,22 +107,6 @@ ErrorState *clientBuildError(err_type, Http::StatusCode, char const *url, Ip::Ad
 
 CBDATA_CLASS_INIT(ClientRequestContext);
 
-void *
-ClientRequestContext::operator new (size_t size)
-{
-    assert (size == sizeof(ClientRequestContext));
-    CBDATA_INIT_TYPE(ClientRequestContext);
-    ClientRequestContext *result = cbdataAlloc(ClientRequestContext);
-    return result;
-}
-
-void
-ClientRequestContext::operator delete (void *address)
-{
-    ClientRequestContext *t = static_cast<ClientRequestContext *>(address);
-    cbdataFree(t);
-}
-
 /* Local functions */
 /* other */
 static void clientAccessCheckDoneWrapper(allow_t, void *);
@@ -170,22 +154,6 @@ ClientRequestContext::ClientRequestContext(ClientHttpRequest *anHttp) : http(cbd
 
 CBDATA_CLASS_INIT(ClientHttpRequest);
 
-void *
-ClientHttpRequest::operator new (size_t size)
-{
-    assert (size == sizeof (ClientHttpRequest));
-    CBDATA_INIT_TYPE(ClientHttpRequest);
-    ClientHttpRequest *result = cbdataAlloc(ClientHttpRequest);
-    return result;
-}
-
-void
-ClientHttpRequest::operator delete (void *address)
-{
-    ClientHttpRequest *t = static_cast<ClientHttpRequest *>(address);
-    cbdataFree(t);
-}
-
 ClientHttpRequest::ClientHttpRequest(ConnStateData * aConn) :
 #if USE_ADAPTATION
         AsyncJob("ClientHttpRequest"),
index 106eef46e4a99e567b23e096bfc8a6f125a0469d..07bd99ee2aabb2f7149f027ffb08753c8c67b08f 100644 (file)
@@ -58,11 +58,6 @@ class ClientHttpRequest
 {
 
 public:
-    void *operator new (size_t);
-    void operator delete (void *);
-#if USE_ADAPTATION
-    void *toCbdata() { return this; }
-#endif
     ClientHttpRequest(ConnStateData *csd);
     ~ClientHttpRequest();
     /* Not implemented - present to prevent synthetic operations */
@@ -196,7 +191,7 @@ private:
 #endif
 
 private:
-    CBDATA_CLASS(ClientHttpRequest);
+    CBDATA_CLASS2(ClientHttpRequest);
 };
 
 /* client http based routines */
index 779cfd10596756d286f158891ba2936e04a60e48..7f8012dfbdd1c5fa227c6301f28e6edf568cd59d 100644 (file)
@@ -48,8 +48,6 @@ class ESIContext : public esiTreeParent, public ESIParserClient
 
 public:
     typedef RefCount<ESIContext> Pointer;
-    void *operator new (size_t byteCount);
-    void operator delete (void *address);
     ESIContext() :
             thisNode(NULL),
             http(NULL),
@@ -181,7 +179,7 @@ private:
     virtual void parserComment (const char *s);
     bool processing;
 
-    CBDATA_CLASS(ESIContext);
+    CBDATA_CLASS2(ESIContext);
 };
 
 #endif /* SQUID_ESICONTEXT_H */
index 939ee507dc2814fff7afe29085d50f9bbe6e196f..480453d54f542f1c70bba2f6a51725ac383c0bc0 100644 (file)
@@ -276,22 +276,6 @@ ESIStreamContext::ESIStreamContext() : finished(false), include (NULL), localbuf
 /* ESIContext */
 static ESIContext *ESIContextNew(HttpReply *, clientStreamNode *, ClientHttpRequest *);
 
-void *
-ESIContext::operator new(size_t byteCount)
-{
-    assert (byteCount == sizeof (ESIContext));
-    CBDATA_INIT_TYPE(ESIContext);
-    ESIContext *result = cbdataAlloc(ESIContext);
-    return result;
-}
-
-void
-ESIContext::operator delete (void *address)
-{
-    ESIContext *t = static_cast<ESIContext *>(address);
-    cbdataFree(t);
-}
-
 void
 ESIContext::setError()
 {
index 2bb907f71f3a60a43cb20b1d73973b58e2834eaf..46d441a1d598bb8d4573868eef8d3beea51e17ef 100644 (file)
@@ -235,22 +235,6 @@ ESIStreamContext::freeResources()
     include = NULL;
 }
 
-void *
-ESIStreamContext::operator new(size_t byteCount)
-{
-    assert (byteCount == sizeof (ESIStreamContext));
-    CBDATA_INIT_TYPE(ESIStreamContext);
-    ESIStreamContext *result = cbdataAlloc(ESIStreamContext);
-    return result;
-}
-
-void
-ESIStreamContext::operator delete (void *address)
-{
-    ESIStreamContext *t = static_cast<ESIStreamContext *>(address);
-    cbdataFree(t);
-}
-
 ESIStreamContext *
 ESIStreamContextNew (ESIIncludePtr include)
 {
index f85d3987648ffb97ddef3e983772bfb2782b6a39..ad47bc30686b4f01d400fd486a44403dfb31a127 100644 (file)
@@ -46,8 +46,6 @@ class ESIStreamContext : public RefCountable
 
 public:
     typedef RefCount<ESIStreamContext> Pointer;
-    void *operator new(size_t);
-    void operator delete(void *);
     ESIStreamContext();
     ~ESIStreamContext();
     void freeResources();
@@ -57,7 +55,7 @@ public:
     ESISegment::Pointer buffer;
 
 private:
-    CBDATA_CLASS(ESIStreamContext);
+    CBDATA_CLASS2(ESIStreamContext);
 };
 
 /* ESIInclude */
index acdb6dbf0b75b2c4424cb89de99d43b97ab9024e..482cdf9140fe2ef073a40c98d18ce4e3ef2381b5 100644 (file)
@@ -107,14 +107,12 @@ class CossRead : public ReadRequest
 {
 
 public:
-    void * operator new (size_t);
-    void operator delete (void *);
     CossRead(ReadRequest const &base, StoreIOState::Pointer anSio) : ReadRequest(base) , sio(anSio) {}
 
     StoreIOState::Pointer sio;
 
 private:
-    CBDATA_CLASS(CossRead);
+    CBDATA_CLASS2(CossRead);
 };
 
 #include "DiskIO/WriteRequest.h"
@@ -124,14 +122,12 @@ class CossWrite : public WriteRequest
 {
 
 public:
-    void * operator new (size_t);
-    void operator delete (void *);
     CossWrite(WriteRequest const &base, CossMemBuf *aBuf) : WriteRequest(base) , membuf(aBuf) {}
 
     CossMemBuf *membuf;
 
 private:
-    CBDATA_CLASS(CossWrite);
+    CBDATA_CLASS2(CossWrite);
 };
 
 #endif
index 91356658032068a33587fc94a00ec82f8a3fe0cf..95b8d6ef39c0b97dc3fafbebce630eb0f5c6a3d0 100644 (file)
@@ -396,34 +396,7 @@ CossSwapDir::storeCossFilenoToMembuf(sfileno f)
 /*  === STATIC =========================================================== */
 
 CBDATA_CLASS_INIT(CossRead);
-void *
-CossRead::operator new (size_t)
-{
-    CBDATA_INIT_TYPE(CossRead);
-    CossRead *result = cbdataAlloc(CossRead);
-    return result;
-}
-
-void
-CossRead::operator delete (void *address)
-{
-    cbdataFree(address);
-}
-
 CBDATA_CLASS_INIT(CossWrite);
-void *
-CossWrite::operator new (size_t)
-{
-    CBDATA_INIT_TYPE(CossWrite);
-    CossWrite *result = cbdataAlloc(CossWrite);
-    return result;
-}
-
-void
-CossWrite::operator delete (void *address)
-{
-    cbdataFree(address);
-}
 
 void
 CossState::doCallback(int errflag)
index 74ba8b8800e2856ce3ad6d10ed142854f9db0ddd..a6c4708571f1117a983f487d08b3378e5c997335 100644 (file)
 
 CBDATA_NAMESPACED_CLASS_INIT(Fs::Ufs,UFSStoreState);
 
-void *
-Fs::Ufs::UFSStoreState::operator new (size_t)
-{
-    CBDATA_INIT_TYPE(UFSStoreState);
-    return cbdataAlloc(UFSStoreState);
-}
-
-void
-Fs::Ufs::UFSStoreState::operator delete (void *address)
-{
-    cbdataFree(address);
-}
-
 void
 Fs::Ufs::UFSStoreState::ioCompletedNotification()
 {
index 4be8139702b833e84f8a05680f38adb3595caa36..cd05d8a498d2f22fa2785eca272700210cb01c35 100644 (file)
@@ -42,8 +42,6 @@ namespace Ufs
 class UFSStoreState : public StoreIOState, public IORequestor
 {
 public:
-    void * operator new (size_t);
-    void operator delete (void *);
     UFSStoreState(SwapDir * SD, StoreEntry * anEntry, STIOCB * callback_, void *callback_data_);
     ~UFSStoreState();
     virtual void close(int how);
@@ -118,7 +116,7 @@ private:
     void openDone();
     void freePending();
     void doWrite();
-    CBDATA_CLASS(UFSStoreState);
+    CBDATA_CLASS2(UFSStoreState);
 };
 
 MEMPROXY_CLASS_INLINE(UFSStoreState::_queued_read);
index ed91f01fed9e7f6eb352e6e4d751209ab3db78cd..0d303a99d493c74d2a10affa71f24c5250887ff8 100644 (file)
@@ -121,21 +121,6 @@ peerDigestClean(PeerDigest * pd)
 
 CBDATA_CLASS_INIT(PeerDigest);
 
-void *
-PeerDigest::operator new (size_t)
-{
-    CBDATA_INIT_TYPE(PeerDigest);
-    PeerDigest *result = cbdataAlloc(PeerDigest);
-    return result;
-}
-
-void
-PeerDigest::operator delete (void *address)
-{
-    PeerDigest *t = static_cast<PeerDigest *>(address);
-    cbdataFree(t);
-}
-
 /* allocate new peer digest, call Init, and lock everything */
 PeerDigest *
 peerDigestCreate(CachePeer * p)
index 3c6c4186f1500ff0539e1a810af699e635a40da7..a5db344763b5521477a24227a341328cb8d3a156 100644 (file)
@@ -68,21 +68,6 @@ static void CheckQuickAbort(StoreEntry * entry);
 
 CBDATA_CLASS_INIT(store_client);
 
-void *
-store_client::operator new (size_t)
-{
-    CBDATA_INIT_TYPE(store_client);
-    store_client *result = cbdataAlloc(store_client);
-    return result;
-}
-
-void
-store_client::operator delete (void *address)
-{
-    store_client *t = static_cast<store_client *>(address);
-    cbdataFree(t);
-}
-
 bool
 store_client::memReaderHasLowerOffset(int64_t anOffset) const
 {
index 1c9e27ba14621b9f717d7d4d8a948506a565b139..77d9ff469277edb519b67e4a86645b8305845448 100644 (file)
@@ -27,7 +27,6 @@ bool ClientSocketContext::multipartRangeRequest() const STUB_RETVAL(false)
 void ClientSocketContext::registerWithConn() STUB
 void ClientSocketContext::noteIoError(const int xerrno) STUB
 void ClientSocketContext::writeControlMsg(HttpControlMsg &msg) STUB
-void ClientSocketContext::operator delete(void *address) STUB
 
 void ConnStateData::readSomeData() STUB
 int ConnStateData::getAvailableBufferLength() const STUB_RETVAL(0)