From: hno <> Date: Thu, 14 Feb 2002 00:22:36 +0000 (+0000) Subject: Renamed memAllocBuf/memFreeBuf to memAllocString/memFreeString as these X-Git-Tag: SQUID_3_0_PRE1~1189 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4be8fe593bec06892ac0e52e6debd4a281823a5a;p=thirdparty%2Fsquid.git Renamed memAllocBuf/memFreeBuf to memAllocString/memFreeString as these buffers are not for generic purpose use.. Intend to add a generic purpose allocator using the MEM_*_BUF types.. --- diff --git a/src/String.cc b/src/String.cc index 28b4296ad5..5db016529c 100644 --- a/src/String.cc +++ b/src/String.cc @@ -1,6 +1,6 @@ /* - * $Id: String.cc,v 1.9 2001/01/12 00:37:14 wessels Exp $ + * $Id: String.cc,v 1.10 2002/02/13 17:22:36 hno Exp $ * * DEBUG: section 67 String * AUTHOR: Duane Wessels @@ -38,7 +38,7 @@ static void stringInitBuf(String * s, size_t sz) { - s->buf = memAllocBuf(sz, &sz); + s->buf = memAllocString(sz, &sz); assert(sz < 65536); s->size = sz; } @@ -77,7 +77,7 @@ stringClean(String * s) { assert(s); if (s->buf) - memFreeBuf(s->size, s->buf); + memFreeString(s->size, s->buf); *s = StringNull; } diff --git a/src/mem.cc b/src/mem.cc index 776ac2cdeb..e8fa6b9775 100644 --- a/src/mem.cc +++ b/src/mem.cc @@ -1,6 +1,6 @@ /* - * $Id: mem.cc,v 1.59 2001/09/07 18:02:45 adrian Exp $ + * $Id: mem.cc,v 1.60 2002/02/13 17:22:36 hno Exp $ * * DEBUG: section 13 High Level Memory Pool Management * AUTHOR: Harvest Derived @@ -136,7 +136,7 @@ memFree(void *p, int type) /* allocate a variable size buffer using best-fit pool */ void * -memAllocBuf(size_t net_size, size_t * gross_size) +memAllocString(size_t net_size, size_t * gross_size) { int i; MemPool *pool = NULL; @@ -154,9 +154,9 @@ memAllocBuf(size_t net_size, size_t * gross_size) return pool ? memPoolAlloc(pool) : xcalloc(1, net_size); } -/* free buffer allocated with memAllocBuf() */ +/* free buffer allocated with memAllocString() */ void -memFreeBuf(size_t size, void *buf) +memFreeString(size_t size, void *buf) { int i; MemPool *pool = NULL; diff --git a/src/protos.h b/src/protos.h index dbdc1adac5..737114c9ad 100644 --- a/src/protos.h +++ b/src/protos.h @@ -1,6 +1,6 @@ /* - * $Id: protos.h,v 1.423 2002/01/13 01:08:44 robertc Exp $ + * $Id: protos.h,v 1.424 2002/02/13 17:22:36 hno Exp $ * * * SQUID Web Proxy Cache http://www.squid-cache.org/ @@ -839,9 +839,9 @@ extern void memInitModule(void); extern void memCleanModule(void); extern void memConfigure(void); extern void *memAllocate(mem_type); -extern void *memAllocBuf(size_t net_size, size_t * gross_size); +extern void *memAllocString(size_t net_size, size_t * gross_size); extern void memFree(void *, int type); -extern void memFreeBuf(size_t size, void *); +extern void memFreeString(size_t size, void *); extern void memFree2K(void *); extern void memFree4K(void *); extern void memFree8K(void *);