|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r53854 - in sandbox/monotonic: boost/monotonic libs/monotonic/doc libs/monotonic/test
From: christian.schladetsch_at_[hidden]
Date: 2009-06-13 01:56:20
Author: cschladetsch
Date: 2009-06-13 01:56:19 EDT (Sat, 13 Jun 2009)
New Revision: 53854
URL: http://svn.boost.org/trac/boost/changeset/53854
Log:
removed the ugly storage_interface structure
Removed:
sandbox/monotonic/boost/monotonic/storage.h
Text files modified:
sandbox/monotonic/boost/monotonic/allocator.h | 4 ++--
sandbox/monotonic/boost/monotonic/storage_base.h | 26 ++++++--------------------
sandbox/monotonic/libs/monotonic/doc/index.html | 2 +-
sandbox/monotonic/libs/monotonic/test/monotonic.vcproj | 4 ----
4 files changed, 9 insertions(+), 27 deletions(-)
Modified: sandbox/monotonic/boost/monotonic/allocator.h
==============================================================================
--- sandbox/monotonic/boost/monotonic/allocator.h (original)
+++ sandbox/monotonic/boost/monotonic/allocator.h 2009-06-13 01:56:19 EDT (Sat, 13 Jun 2009)
@@ -54,7 +54,7 @@
};
/// the storage used by the allocator
- storage_interface *storage;
+ storage_base *storage;
public:
allocator() throw()
@@ -62,7 +62,7 @@
{
}
- allocator(storage_interface &P) throw()
+ allocator(storage_base &P) throw()
: storage(&P)
{
}
Deleted: sandbox/monotonic/boost/monotonic/storage.h
==============================================================================
--- sandbox/monotonic/boost/monotonic/storage.h 2009-06-13 01:56:19 EDT (Sat, 13 Jun 2009)
+++ (empty file)
@@ -1,23 +0,0 @@
-// Copyright (C) 2009 Christian Schladetsch
-//
-// Distributed under the Boost Software License, Version 1.0. (See accompanying
-// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-
-#pragma once
-
-namespace boost
-{
- namespace monotonic
- {
- /// interface common to all storage heaps
- struct storage_interface
- {
- virtual void *allocate(size_t num_bytes, void const *hint = 0) = 0;
- virtual void deallocate(void *base, size_t num_bytes) = 0;
- virtual size_t max_size() const = 0;
- virtual size_t remaining() const = 0;
- };
- }
-}
-
-//EOF
Modified: sandbox/monotonic/boost/monotonic/storage_base.h
==============================================================================
--- sandbox/monotonic/boost/monotonic/storage_base.h (original)
+++ sandbox/monotonic/boost/monotonic/storage_base.h 2009-06-13 01:56:19 EDT (Sat, 13 Jun 2009)
@@ -5,33 +5,19 @@
#pragma once
-#include <limits>
-#include <stdlib.h>
#include <boost/monotonic/storage.h>
namespace boost
{
namespace monotonic
{
- /// base structure for all allocators.
- ///
- /// implements storage_interface using malloc and free
- struct storage_base : storage_interface
+ /// base structure for inline_storage<N>. should be removed.
+ struct storage_base
{
- void *allocate(size_t num_bytes, void const * = 0)
- {
- return malloc(num_bytes);
- }
-
- void deallocate(void *p, size_t /*n*/)
- {
- free(p);
- }
-
- size_t max_size() const
- {
- return std::numeric_limits<std::size_t>::max();
- }
+ virtual void *allocate(size_t num_bytes, void const *hint = 0) = 0;
+ virtual void deallocate(void *base, size_t num_bytes) = 0;
+ virtual size_t max_size() const = 0;
+ virtual size_t remaining() const = 0;
};
}
}
Modified: sandbox/monotonic/libs/monotonic/doc/index.html
==============================================================================
--- sandbox/monotonic/libs/monotonic/doc/index.html (original)
+++ sandbox/monotonic/libs/monotonic/doc/index.html 2009-06-13 01:56:19 EDT (Sat, 13 Jun 2009)
@@ -143,7 +143,7 @@
the proposal. For comparison, the following are two exactly equivalent types:</p>
<pre>typedef boost::monotonic::map<int, boost::monotonic::list<int> > Map;
typedef std::map<int, std::list<int, boost::monotonic::allocator<int> >, std::less<int>, boost::monotonic::allocator<int> > Map;</pre>
- i<p>
+ <p>
The matter can be argued either way. The container-wrappers currently remain
part of the proposal, but this may change.</p>
<h2 id="Architecture">
Modified: sandbox/monotonic/libs/monotonic/test/monotonic.vcproj
==============================================================================
--- sandbox/monotonic/libs/monotonic/test/monotonic.vcproj (original)
+++ sandbox/monotonic/libs/monotonic/test/monotonic.vcproj 2009-06-13 01:56:19 EDT (Sat, 13 Jun 2009)
@@ -202,10 +202,6 @@
>
</File>
<File
- RelativePath="..\..\..\boost\monotonic\storage.h"
- >
- </File>
- <File
RelativePath="..\..\..\boost\monotonic\storage_base.h"
>
</File>
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