Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 11 Apr 1999 21:00:24 -0700 (PDT)
From:      Matthew Dillon <dillon@apollo.backplane.com>
To:        Brian Feldman <green@unixhelp.org>
Cc:        current@FreeBSD.ORG
Subject:   Re: swap-related problems
Message-ID:  <199904120400.VAA15072@apollo.backplane.com>
References:   <Pine.BSF.4.05.9904112315230.36814-100000@janus.syracuse.net>

next in thread | previous in thread | raw e-mail | index | archive | help
:> 
:>     I ran your program.  malloc() appears to work properly -- returns NULL when
:>     the datasize limit is reached.  In my case, I set the datasize limit 
:>     to 64MB and ran the program.
:
:Unset the datasize limit. Now what happens? It used to return NULL, now
:it gets SIGKILLed. Seriously, about the killing thing, shouldn't we at least
:have a timer so two things don't get killed?

    If you unset the datasize limit and the program does not exceed the
    maximum system-supported datasize limit, malloc() should not return
    NULL even if the system is out of swap.  I don't know why it apparently
    did before -- it shouldn't have.   I seem to remember that the default
    datasize limit for the system was upped a few months ago.  I don't 
    think malloc() operation has changed.

    The correct solution is to set a maximum datasize limit.  That is what
    it is there for.  I generally unlimit the datasize for root and set it
    to around 64MB for all other users.

					-Matt
					Matthew Dillon 
					<dillon@backplane.com>



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199904120400.VAA15072>