$include_dir="/home/hyper-archives/boost-commit/include"; include("$include_dir/msg-header.inc") ?>
Subject: [Boost-commit] svn:boost r54245 - sandbox/monotonic/boost/monotonic/detail
From: christian.schladetsch_at_[hidden]
Date: 2009-06-22 19:37:44
Author: cschladetsch
Date: 2009-06-22 19:37:43 EDT (Mon, 22 Jun 2009)
New Revision: 54245
URL: http://svn.boost.org/trac/boost/changeset/54245
Log:
added trap for null allocation from heap for Pool
Text files modified:
sandbox/monotonic/boost/monotonic/detail/pool.hpp | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
Modified: sandbox/monotonic/boost/monotonic/detail/pool.hpp
==============================================================================
--- sandbox/monotonic/boost/monotonic/detail/pool.hpp (original)
+++ sandbox/monotonic/boost/monotonic/detail/pool.hpp 2009-06-22 19:37:43 EDT (Mon, 22 Jun 2009)
@@ -40,6 +40,8 @@
if (ptr == 0)
{
ptr = storage.from_heap(capacity, 16);
+ if (ptr == 0)
+ throw std::bad_alloc("monotonic::pool");
}
first = next = (char *)ptr;
last = first + capacity;