git: kernel - Add zero-on-instantiate objcache ctor
Matthew Dillon
dillon at crater.dragonflybsd.org
Tue Jun 23 23:01:44 PDT 2015
commit 7d4ac97cda38def7d38fbb3803e02f089ab5ef5f
Author: Matthew Dillon <dillon at apollo.backplane.com>
Date: Tue Jun 23 22:59:15 2015 -0700
kernel - Add zero-on-instantiate objcache ctor
* When creating kmalloc-backed pools, M_ZERO cannot be passed to
objcache_get() because the underlying kmalloc only occurs when
the objcache is not recycling a cached entry.
* Add a feature to the objcache whereby the allocation from backing
store is zero'd. The reuse case will not be zerod, so users of
this type of objcache must properly reset/cleanup fields before
disposing of the object.
* Used by HAMMER2.
Summary of changes:
sys/kern/kern_objcache.c | 14 ++++++++++++++
sys/sys/objcache.h | 1 +
2 files changed, 15 insertions(+)
http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/7d4ac97cda38def7d38fbb3803e02f089ab5ef5f
--
DragonFly BSD source repository
More information about the Commits
mailing list