]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Made use of stub_mem.cc
authorFrancesco Chemolli <kinkie@squid-cache.org>
Wed, 13 Nov 2013 17:30:54 +0000 (18:30 +0100)
committerFrancesco Chemolli <kinkie@squid-cache.org>
Wed, 13 Nov 2013 17:30:54 +0000 (18:30 +0100)
src/Makefile.am
src/tests/stub_mem.cc

index 886da8f5d59ca8b5b5d087f3618ca81a96bb3598..0c76aa246cd5d4ea62c65d4749731ce2dfde3dfb 100644 (file)
@@ -1141,7 +1141,7 @@ tests_testHttpReply_SOURCES=\
        HttpReply.cc \
        HttpReply.h \
        Mem.h \
-       mem.cc \
+       tests/stub_mem.cc \
        RegexList.h \
        RegexList.cc \
        MemBuf.cc \
@@ -1314,7 +1314,7 @@ tests_testACLMaxUserIP_SOURCES= \
        URLScheme.cc \
        URLScheme.h \
        Mem.h \
-       mem.cc \
+       tests/stub_mem.cc \
        MemBuf.cc \
        wordlist.h \
        wordlist.cc
@@ -1376,7 +1376,7 @@ tests_testCacheManager_SOURCES = \
        HttpRequest.cc \
        HttpRequestMethod.cc \
        Mem.h \
-       mem.cc \
+       tests/stub_mem.cc \
        String.cc \
        tests/testCacheManager.cc \
        tests/testCacheManager.h \
@@ -1659,7 +1659,7 @@ tests_testDiskIO_SOURCES = \
        MemObject.cc \
        mem_node.cc \
        Mem.h \
-       mem.cc \
+       tests/stub_mem.cc \
        Notes.h \
        Notes.cc \
        Packer.cc \
@@ -1890,7 +1890,7 @@ tests_testEvent_SOURCES = \
        MasterXaction.cc \
        MasterXaction.h \
        Mem.h \
-       mem.cc \
+       tests/stub_mem.cc \
        mem_node.cc \
        MemBuf.cc \
        MemObject.cc \
@@ -2136,7 +2136,7 @@ tests_testEventLoop_SOURCES = \
        MemBuf.cc \
        MemObject.cc \
        Mem.h \
-       mem.cc \
+       tests/stub_mem.cc \
        mem_node.cc \
        mime.h \
        mime.cc \
@@ -2376,7 +2376,7 @@ tests_test_http_range_SOURCES = \
        MemBuf.cc \
        MemObject.cc \
        Mem.h \
-       mem.cc \
+       tests/stub_mem.cc \
        mem_node.cc \
        mime.h \
        mime.cc \
@@ -2514,7 +2514,7 @@ tests_testHttpParser_SOURCES = \
        MemBuf.cc \
        MemBuf.h \
        Mem.h \
-       mem.cc \
+       tests/stub_mem.cc \
        String.cc \
        cache_cf.h \
        YesNoNone.h \
@@ -2556,7 +2556,7 @@ tests_testHttpRequest_SOURCES = \
        HttpRequest.cc \
        HttpRequestMethod.cc \
        Mem.h \
-       mem.cc \
+       tests/stub_mem.cc \
        String.cc \
        tests/testHttpRequest.h \
        tests/testHttpRequest.cc \
@@ -2829,7 +2829,7 @@ tests_testStore_SOURCES= \
        MasterXaction.cc \
        MasterXaction.h \
        Mem.h \
-       mem.cc \
+       tests/stub_mem.cc \
        mem_node.cc \
        MemBuf.cc \
        MemObject.cc \
@@ -2958,7 +2958,7 @@ tests_testStore_DEPENDENCIES = \
 tests_testString_SOURCES = \
        ClientInfo.h \
        Mem.h \
-       mem.cc \
+       tests/stub_mem.cc \
        MemBuf.cc \
        String.cc \
        tests/testMain.cc \
@@ -3454,7 +3454,7 @@ tests_testURL_SOURCES = \
        multicast.h \
        multicast.cc \
        Mem.h \
-       mem.cc \
+       tests/stub_mem.cc \
        mem_node.cc \
        MemBuf.cc \
        MemObject.cc \
@@ -3601,7 +3601,7 @@ tests_testSBuf_SOURCES= \
        $(SBUF_SOURCE) \
        SBufStream.h \
        tests/stub_time.cc \
-       mem.cc \
+       tests/stub_mem.cc \
        tests/stub_debug.cc \
        tests/stub_fatal.cc \
        tests/stub_HelperChildConfig.cc \
index 38181cc6accbea6e844f2a050b615c012272db80..17a8d3c5fbb1496f3e833fb1a1fce98a9a45d43c 100644 (file)
@@ -59,7 +59,14 @@ memFreeBufFunc(size_t size)
     return cxx_xfree;
 }
 
-void * memAllocate(mem_type type) STUB_RETVAL(NULL)
-void memFree(void *p, int type) STUB
+void * memAllocate(mem_type type) {
+    // let's waste plenty of memory. This should cover any possible need
+    return xmalloc(64*1024);
+}
+void memFree(void *p, int type) {
+    xfree(p);
+}
 void Mem::Init(void) STUB_NOP
-
+void memDataInit(mem_type, const char *, size_t, int, bool) STUB_NOP
+int memInUse(mem_type) STUB_RETVAL(0)
+void memConfigure(void) STUB_NOP