Squid internals MemBufs (src/MemBuf.c) (ctd.) How it works For the most part, a MemBuf is used through the printf()-like interface (memBufPrintf()) The MemBuf is 'grown' through memBufGrow() - each call to this doubles the size of the MemBuf, cutting down on the number of reallocs. The realloc is done through a realloc() libc call