Re: [bug] MemBuf and using as string

From: Alex Rousskov <>
Date: Tue, 16 Apr 2002 08:13:07 -0600 (MDT)

On Tue, 16 Apr 2002, Henrik Nordstrom wrote:

> Found why we haven't seen this before.. the old MemPools always cleared
> freed memory, but the chunked pools sometimes skip this..

Historical note: IIRC, from user perspective, the old pools cleared
memory when allocating it to the user. Thus, if one wants new buffers
clean, the code did not waste CPU cycles.

The implementation cleared memory "earlier", when the buffer was
returned by the user, to also detect use-after-free cases.

The same trick to save CPU cycles and kill two birds with one stone
does not work if you want to have a mix of [expensive] clean and
[cheap] dirty buffers.

Received on Tue Apr 16 2002 - 08:13:09 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:15:11 MST