DragonFly bugs List (threaded) for 2009-03
DragonFly BSD
DragonFly bugs List (threaded) for 2009-03
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

[issue1251] no man page for objcache functions


From: "Samuel J. Greear \(via DragonFly issue tracker\)" <sinknull@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Wed, 04 Mar 2009 06:57:38 +0000

Samuel J. Greear <sjg@evilcode.net> added the comment:

Some thoughts, best practices or methodologies for specifying cluster_limit0
and/or mag_capacity would make the objcache_create() description more complete.
Even just a simple example use-case.

_get() could stand the addition of "All objects are returned in an initialized
state, newly allocated objects are subjected to the object caches constructor
function, if not NULL, prior to being returned."

_put() and _dtor() could probably be further clarified.

objcache_put() returns obj to the oc object cache. The object must be in its
initialized state prior to this call. If there is no empty magazine available,
the object caches deconstructor function is called and the object is freed.

objcache_dtor() puts the obj back into the oc object cache, indicating that the
object is not in any shape to be reused and should be deconstructed and freed
immediately.

An EXAMPLES section containing a complete but minified in-kernel implementation
of the common case usage would really round this out, although not necessary.

Looks good.

_____________________________________________________
DragonFly issue tracker <bugs@lists.dragonflybsd.org>
<http://bugs.dragonflybsd.org/issue1251>
_____________________________________________________



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]