]>
git.ipfire.org Git - thirdparty/squid.git/blob - src/tests/stub_mem.cc
7 #define STUB_API "stub_mem.cc"
9 /* mem* definitions are still in protos.h */
13 memFreeString(size_t size
, void *buf
)
19 memAllocString(size_t net_size
, size_t * gross_size
)
22 return xmalloc(net_size
);
26 memFreeBuf(size_t size
, void *buf
)
32 memAllocBuf(size_t net_size
, size_t * gross_size
)
35 return xcalloc(1, net_size
);
38 /* net_size is the new size, *gross size is the old gross size, to be changed to
39 * the new gross size as a side-effect.
42 memReallocBuf(void *oldbuf
, size_t net_size
, size_t * gross_size
)
44 void *rv
=xrealloc(oldbuf
,net_size
);
45 // if (net_size > *gross_size)
46 // memset(rv+net_size,0,net_size-*gross_size);
58 memFreeBufFunc(size_t size
)
64 memAllocate(mem_type type
)
68 memFree(void *p
, int type
)