summaryrefslogtreecommitdiff
path: root/include/iprt/memcache.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/iprt/memcache.h')
-rw-r--r--include/iprt/memcache.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/include/iprt/memcache.h b/include/iprt/memcache.h
index cad496b1..6cf8c2a5 100644
--- a/include/iprt/memcache.h
+++ b/include/iprt/memcache.h
@@ -37,7 +37,17 @@ RT_C_DECLS_BEGIN
* @ingroup grp_rt
*
* Optimized allocation, initialization, freeing and destruction of memory
- * objects of the same kind and size.
+ * objects of the same kind and size. Objects are constructed once, then
+ * allocated and freed one or more times, until finally destructed together with
+ * the cache (RTMemCacheDestroy). It's expected behavior, even when pfnCtor is
+ * NULL, that the user will be store information that should be persistent
+ * across RTMemCacheFree calls.
+ *
+ * The objects are zeroed prior to calling pfnCtor. For obvious reasons, the
+ * objects are not touched by the cache after that, so that RTMemCacheAlloc will
+ * return the object in the same state as when it as handed to RTMemCacheFree.
+ *
+ * @todo A callback for the reuse (at alloc time) might be of interest.
*
* @{
*/