Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r54513 - sandbox/monotonic/boost/heterogenous
From: christian.schladetsch_at_[hidden]
Date: 2009-06-29 20:00:37


Author: cschladetsch
Date: 2009-06-29 20:00:36 EDT (Mon, 29 Jun 2009)
New Revision: 54513
URL: http://svn.boost.org/trac/boost/changeset/54513

Log:
changed comments

Text files modified:
   sandbox/monotonic/boost/heterogenous/make_clone_allocator.hpp | 9 +++++++++
   1 files changed, 9 insertions(+), 0 deletions(-)

Modified: sandbox/monotonic/boost/heterogenous/make_clone_allocator.hpp
==============================================================================
--- sandbox/monotonic/boost/heterogenous/make_clone_allocator.hpp (original)
+++ sandbox/monotonic/boost/heterogenous/make_clone_allocator.hpp 2009-06-29 20:00:36 EDT (Mon, 29 Jun 2009)
@@ -16,6 +16,8 @@
         {
                 namespace impl
                 {
+ /// adapts a given Alloc type, modelling a v1 std::allocator concept, to provide
+ /// services required by abstract_allocator
                         template <class Alloc>
                         struct clone_allocator : Alloc, abstract_allocator
                         {
@@ -34,6 +36,10 @@
                                 {
                                         CharAlloc alloc(*this);
                                         return alloc.allocate(num_bytes);
+
+ // TODO: do correct alignment, store padding information so dealloc
+ // can retrieve the originally allocated pointer
+
                                         //CharAlloc alloc(*this);
                                         //header head;
                                         //head.num_bytes = sizeof(header) + num_bytes + alignment; // don't need this much, but will do for now
@@ -49,6 +55,9 @@
                                 {
                                         CharAlloc alloc(*this);
                                         alloc.deallocate(ptr);
+
+ // TODO: retreive the originally allocated pointer
+
                                         //header *head = reinterpret_cast<header *>(ptr - sizeof(head));
                                         //alloc.deallocate(head->allocated_ptr, head->num_bytes);
                                 }


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk