Re: Memory allocation errors

David Schwartz (
Tue, 28 Jan 1997 13:55:35 -0500 (EST)

You made some sense up until here:

On Tue, 28 Jan 1997, Richard B. Johnson wrote:

> If memory isn't freed, here's another "denial of services" ...

Any DOS attack could just as easily not call 'free'.

A general purpose malloc/free pair that allocates memory out of a
single linear pool should never try to shrink that pool. Only a
malloc/free pair for programs that can expect to benefit from this
behavior should use it.

If you need large transient buffers that need to be returned, you
MUST allocate them from their own pool so that the whole pool can be
returned to the operating system. mmap/munmap do this. malloc/free do not
and can not.


In the news today: A fire tore through Bob Dole's library. Both books
were destroyed, and he hadn't even finished coloring one yet.