Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 13 Jan 2002 05:08:36 -0800
From:      Alfred Perlstein <bright@mu.org>
To:        smp@freebsd.org
Cc:        jhb@freebsd.org, dillon@freebsd.org
Subject:   making malloc(9) smp safe?
Message-ID:  <20020113050836.Q7984@elvis.mu.org>

next in thread | raw e-mail | index | archive | help
Malloc has its own mutex, however when it needs to do page allocations
via kmem_malloc() it drops the mutex and calls it.

kmem_malloc() needs giant.

what do I do?

Do I grab giant before calling malloc(9)?
Do I make malloc(9) aquire or recurse on giant automatically?
  (basically grab giant around kmem_malloc() call in malloc(9))

?

-- 
-Alfred Perlstein [alfred@freebsd.org]
'Instead of asking why a piece of software is using "1970s technology,"
 start asking why software is ignoring 30 years of accumulated wisdom.'
Tax deductable donations for FreeBSD: http://www.freebsdfoundation.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?20020113050836.Q7984>