Subject: Re: Replacement for grep(1) (part 2)
To: Jon Ribbens <>
From: Daniel C. Sobral <>
List: tech-userlevel
Date: 07/12/1999 09:30:53
Jon Ribbens wrote:
> "Daniel C. Sobral" <> wrote:
> > OTOH, though, FreeBSD's malloc() is very unlikely to return an out
> > of memory error.
> Why is that?

Because memory (as in *real* memory, either RAM or swap) is
allocated on-demand. So you can allocate any amount of virtual
memory that the system can possibly provide you, even though you'll
run out of memory much earlier, because other resources are also
consuming it.

> What happens if the process hits its resource limits?

If the system runs out of memory, the biggest process is killed. It
might or might not be the one demanding additional memory.

Daniel C. Sobral			(8-DCS)

	I'm one of those bad things that happen to good people.