aboutsummaryrefslogtreecommitdiffstats
path: root/src/alloc
diff options
context:
space:
mode:
authorlloyd <[email protected]>2009-10-22 17:35:04 +0000
committerlloyd <[email protected]>2009-10-22 17:35:04 +0000
commitbbe91cb8030c2d1a910082650a02a0747a718a8e (patch)
treed06232e2cedc05662eafe827a8471b1ec688e146 /src/alloc
parent8addfadd8cb724158fefd4f9e36a177b2290d11f (diff)
Remove all exception specifications. The way these are designed in C++ is
just too fragile and not that useful. Something like Java's checked exceptions might be nice, but simply killing the process entirely if an unexpected exception is thrown is not exactly useful for something trying to be robust.
Diffstat (limited to 'src/alloc')
-rw-r--r--src/alloc/mem_pool/mem_pool.cpp6
-rw-r--r--src/alloc/mem_pool/mem_pool.h6
2 files changed, 6 insertions, 6 deletions
diff --git a/src/alloc/mem_pool/mem_pool.cpp b/src/alloc/mem_pool/mem_pool.cpp
index dabf5e310..e30a7b98a 100644
--- a/src/alloc/mem_pool/mem_pool.cpp
+++ b/src/alloc/mem_pool/mem_pool.cpp
@@ -42,7 +42,7 @@ Pooling_Allocator::Memory_Block::Memory_Block(void* buf)
* See if ptr is contained by this block
*/
bool Pooling_Allocator::Memory_Block::contains(void* ptr,
- u32bit length) const throw()
+ u32bit length) const
{
return ((buffer <= ptr) &&
(buffer_end >= static_cast<byte*>(ptr) + length * BLOCK_SIZE));
@@ -51,7 +51,7 @@ bool Pooling_Allocator::Memory_Block::contains(void* ptr,
/*
* Allocate some memory, if possible
*/
-byte* Pooling_Allocator::Memory_Block::alloc(u32bit n) throw()
+byte* Pooling_Allocator::Memory_Block::alloc(u32bit n)
{
if(n == 0 || n > BITMAP_SIZE)
return 0;
@@ -91,7 +91,7 @@ byte* Pooling_Allocator::Memory_Block::alloc(u32bit n) throw()
/*
* Mark this memory as free, if we own it
*/
-void Pooling_Allocator::Memory_Block::free(void* ptr, u32bit blocks) throw()
+void Pooling_Allocator::Memory_Block::free(void* ptr, u32bit blocks)
{
clear_mem(static_cast<byte*>(ptr), blocks * BLOCK_SIZE);
diff --git a/src/alloc/mem_pool/mem_pool.h b/src/alloc/mem_pool/mem_pool.h
index a57800972..51571405e 100644
--- a/src/alloc/mem_pool/mem_pool.h
+++ b/src/alloc/mem_pool/mem_pool.h
@@ -44,9 +44,9 @@ class BOTAN_DLL Pooling_Allocator : public Allocator
static u32bit bitmap_size() { return BITMAP_SIZE; }
static u32bit block_size() { return BLOCK_SIZE; }
- bool contains(void*, u32bit) const throw();
- byte* alloc(u32bit) throw();
- void free(void*, u32bit) throw();
+ bool contains(void*, u32bit) const;
+ byte* alloc(u32bit);
+ void free(void*, u32bit);
bool operator<(const Memory_Block& other) const
{