From 873997fa330cf3b8173dc575251c1b7a63c954d5 Mon Sep 17 00:00:00 2001 From: Danny Robson Date: Thu, 19 Nov 2015 15:03:57 +1100 Subject: [PATCH] alloc: trivial top level comments for linear/stack --- alloc/linear.hpp | 2 ++ alloc/stack.hpp | 2 ++ 2 files changed, 4 insertions(+) diff --git a/alloc/linear.hpp b/alloc/linear.hpp index 2a0e9606..141c536e 100644 --- a/alloc/linear.hpp +++ b/alloc/linear.hpp @@ -21,6 +21,8 @@ namespace util { namespace alloc { + // allocate progressively across a buffer without concern for deallocation. + // deallocation is a noop; the only way to free allocations is via reset. class linear { public: linear (const linear&) = delete; diff --git a/alloc/stack.hpp b/alloc/stack.hpp index 742a016a..f0d78a0f 100644 --- a/alloc/stack.hpp +++ b/alloc/stack.hpp @@ -22,6 +22,8 @@ namespace util { namespace alloc { + // allocate memory from a buffer in a stacklike manner. deallocation that + // is not correctly ordered has undefined (read 'bad') results. class stack { public: stack (const stack&) = delete;