Date: Sat, 15 Mar 2003 12:41:05 +0100 (CET) From: Harti Brandt <brandt@fokus.fraunhofer.de> To: smp@freebsd.org Cc: jeff@freebsd.org Subject: malloc.9 locking section Message-ID: <20030315123530.X45650@beagle.fokus.fraunhofer.de>
next in thread | raw e-mail | index | archive | help
Hi, attached is a diff to malloc.9 that adds a section 'locking considerations' to the man page. I would like to receive comments about - whether this is altogether useful information to have in the man page - about the section name (Solaris calls this section 'CONTEXT') - about the section contents itself. I'm quite sure, that I got this partly wrong. - about the formatting (not beeing a mandoc expert) harti Index: malloc.9 =================================================================== RCS file: /home/ncvs/src/share/man/man9/malloc.9,v retrieving revision 1.29 diff -u -r1.29 malloc.9 --- malloc.9 5 Feb 2003 14:00:46 -0000 1.29 +++ malloc.9 15 Mar 2003 11:34:03 -0000 @@ -230,6 +230,35 @@ be used with .Xr mbuf 9 routines as it will cause undesired results. +.Sh LOCKING CONSIDERATIONS +.Fn malloc , +.Fn realloc +and +.Fn reallocf +may be called from threaded and fast interrupts handlers. +When called from fast interrupts +.Ar flag +must contain +.Dv M_NOWAIT . +When called from threaded interrupts +.Ar flag +should contain +.Dv M_NOWAIT . +.Pp +.Fn malloc , +.Fn realloc +and +.Fn reallocf +must not be called with +.Dv M_WAIT +while a mutex other than Giant is held. +Giant may or may not be held when +.Fn malloc , +.Fn realloc , +.Fn reallocf +or +.Fn free +are called. .Pp Any calls to .Fn malloc -- harti brandt, http://www.fokus.fraunhofer.de/research/cc/cats/employees/hartmut.brandt/private brandt@fokus.fraunhofer.de, harti@freebsd.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-smp" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030315123530.X45650>