Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 26 Feb 2001 08:57:35 -0600
From:      seebs@plethora.net (Peter Seebach)
To:        freebsd-hackers@freebsd.org
Subject:   Re: Setting memory allocators for library functions. 
Message-ID:  <200102261457.f1QEva607692@guild.plethora.net>
In-Reply-To: Your message of "Sun, 25 Feb 2001 22:06:18 PST." <3A99F25A.B940BEE0@elischer.org> 

next in thread | previous in thread | raw e-mail | index | archive | help
In message <3A99F25A.B940BEE0@elischer.org>, Julian Elischer writes:
>I still think that in such a case it should be possible to
>'test the commitment' by touching all the allocated memory 
>while trapping page faults.

And what do you do if you get one?  There's no undo button for SIGSEGV.
Traditionally, you return from the signal handler right where you were.
Can you get out of this with longjmp()?  Probably.  It's not exactly
supported or guaranteed.

In any event:

1.  The C language spec doesn't require you to do this.
2.  Other implementations have provided this guarantee, at least as an
option.

It's odd that I see lots of people arguing for segfaults killing the process
accessing memory that has been "successfully" allocated, but no one arguing
for the process getting killed when it exceeds a disk quota.

-s

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




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