Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/share/man/man9 remove M_CANFAIL from list of supported flags...



details:   https://anonhg.NetBSD.org/src/rev/852ac365163a
branches:  trunk
changeset: 445123:852ac365163a
user:      jdolecek <jdolecek%NetBSD.org@localhost>
date:      Sun Oct 14 17:40:28 2018 +0000

description:
remove M_CANFAIL from list of supported flags for malloc(9)

diffstat:

 share/man/man9/malloc.9 |  22 +++-------------------
 1 files changed, 3 insertions(+), 19 deletions(-)

diffs (50 lines):

diff -r 62b3f628eac5 -r 852ac365163a share/man/man9/malloc.9
--- a/share/man/man9/malloc.9   Sun Oct 14 17:37:40 2018 +0000
+++ b/share/man/man9/malloc.9   Sun Oct 14 17:40:28 2018 +0000
@@ -1,4 +1,4 @@
-.\"    $NetBSD: malloc.9,v 1.54 2017/07/03 21:28:48 wiz Exp $
+.\"    $NetBSD: malloc.9,v 1.55 2018/10/14 17:40:28 jdolecek Exp $
 .\"
 .\" Copyright (c) 1996, 2003 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -27,7 +27,7 @@
 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\" POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd August 7, 2015
+.Dd October 14, 2018
 .Dt MALLOC 9
 .Os
 .Sh NAME
@@ -126,7 +126,7 @@
 argument further qualifies
 .Fn malloc
 operational characteristics as follows:
-.Bl -tag -offset indent -width M_CANFAIL
+.Bl -tag -offset indent -width M_NOWAIT
 .It Dv M_NOWAIT
 Causes
 .Fn malloc
@@ -153,22 +153,6 @@
 argument to indicate that it's ok to wait for resources.
 .It Dv M_ZERO
 Causes the allocated memory to be set to all zeros.
-.It Dv M_CANFAIL
-Changes behaviour for
-.Dv M_WAITOK
-case - if the requested memory size is bigger than
-.Fn malloc
-can ever allocate, return failure, rather than calling
-.Xr panic 9 .
-This is different to M_NOWAIT, since
-the call can still wait for resources.
-.Pp
-Rather than depending on
-.Dv M_CANFAIL ,
-kernel code should do proper bound checking itself.
-This flag should only be used in cases where this is not feasible.
-Since it can hide real kernel bugs, its usage is
-.Em strongly discouraged .
 .El
 .Pp
 The



Home | Main Index | Thread Index | Old Index