Subject: CVS commit: syssrc/sys
To: None <source-changes@netbsd.org>
From: Jaromir Dolecek <jdolecek@netbsd.org>
List: source-changes
Date: 12/04/2001 22:13:21
Module Name:	syssrc
Committed By:	jdolecek
Date:		Tue Dec  4 20:13:21 UTC 2001

Modified Files:
	syssrc/sys/kern: kern_malloc.c
	syssrc/sys/sys: malloc.h

Log Message:
Add M_CANFAIL malloc(9) flag. This flag changes behaviour in M_WAITOK
case when the requested memory size can't ever be granted - instead
of panic, malloc(9) would return failure (NULL).
Note kernel code should do proper bound checking, rather than
depend on M_CANFAIL. This flag is only supposed to be used in very
special cases, where common bound checking is not appropriate.

Discussed on tech-kern@, name ``M_CANFAIL'' suggested by Chuck Cranor.


To generate a diff of this commit:
cvs rdiff -r1.67 -r1.68 syssrc/sys/kern/kern_malloc.c
cvs rdiff -r1.68 -r1.69 syssrc/sys/sys/malloc.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.