From 2643a46c69d7d1354ec324a274dba4ccca315f3c Mon Sep 17 00:00:00 2001 From: Tycho Date: Sat, 14 Jun 2014 20:04:35 +0100 Subject: [PATCH] Documented cAllocationPool --- src/AllocationPool.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/AllocationPool.h b/src/AllocationPool.h index 88bc132e9..cac5689b9 100644 --- a/src/AllocationPool.h +++ b/src/AllocationPool.h @@ -18,10 +18,15 @@ public: virtual ~cAllocationPool() {} + /** Allocates a pointer to T **/ virtual T * Allocate() = 0; + + /** Frees the pointer passed in a_ptr, invalidating it **/ virtual void Free(T * a_ptr) = 0; }; +/** Allocates memory storing unused elements in a linked list. Keeps at least NumElementsInReserve + elements in the list unless malloc fails so that the program has a reserve to handle OOM.**/ template class cListAllocationPool : public cAllocationPool {