sends don't block, right?

Richard A. O'Keefe <>
Thu Feb 26 00:52:58 CET 2004


Shawn Pearce <> wrote:
	Nah.  I'm not that worried about it.  It was easier to email the list
	and get a response from someone like yourself who knows Erlang better
	than I, than to run a node for hours trying to fill up main memory until
	the node crashes.  When you have a full 1 GB of RAM available to the node
	its gonna take a while to run that test case I posted.
	
In UNIX, it's dead easy and dead quick to find out what happens when
a process runs out of memory.  Use
	% sh
	% ulimit -v N
	% your-program
	% exit
where N is the number of kilobytes you want to limit the program's
virtual memory to.  See also the -d and -s options.

In the C shell, use limit/datasize/stacksize/memorysize instead
of ulimit/-d/-s/-v.

A great way of checking whether C programs check the result of malloc()...
Set the limit to something smallish, and watch the wreckage fly.



More information about the erlang-questions mailing list