Subject: Extensible malloc types
To: None <tech-kern@netbsd.org>
From: Jason R Thorpe <thorpej@wasabisystems.com>
List: tech-kern
Date: 01/30/2003 21:38:26
Folks...
I have integrated the extensible malloc type framework from FreeBSD. For
those not familiar with it, it removes the central location of malloc type
definitions, instead allowing each subsystem to define its own malloc types.
Uses of the kernel malloc API don't really see any difference, however
things that pass malloc types around now must use "struct malloc_type *"
instead of "int" (this meant fixing up audio drivers, which was by far
the most invasive part of these changes).
Among other things, this mechanism is more LKM-friendly, and also makes
it easier for 3rd parties to add kernel extensions. Added bonus of making
it slightly easier to port other code from FreeBSD.
Diffs for your perusal at:
ftp://ftp.netbsd.org/pub/incoming/thorpej/malloc-diffs
ftp://ftp.netbsd.org/pub/incoming/thorpej/vmstat-diffs
There is one set of unrelated changes in the "malloc-diffs" which I will
separate out before committing.
Feedback appreciated.
--
-- Jason R. Thorpe <thorpej@wasabisystems.com>