aboutsummaryrefslogtreecommitdiffstats
path: root/src/mem_pool.cpp
Commit message (Collapse)AuthorAgeFilesLines
* The Memory_Exhaustion exception was only thrown from mem_pool.cpp, solloyd2008-09-141-0/+14
| | | | | move in there. Make it a subclass of std::bad_alloc instead of Botan::Exception (this may prove to be a design mistake).
* Remove the Config class.lloyd2008-06-301-2/+1
| | | | | | | | In reality, Config was a singleton, with the only owner being the Library_State object. Theoretically one could create and use another Config instance, but in practice it was never done. Reflect the reality and inline the members and public functions of Config in Library_State, removing Config entirely.
* Make the memory allocator's chunk size a compile time constant, via alloyd2008-04-121-21/+1
| | | | new build.h macro BOTAN_MEM_POOL_CHUNK_SIZE
* Change the copyrights in all files in the Botan tree to directly reflectlloyd2008-04-101-1/+3
| | | | | | the actual copyright holders. For rationale, see my post to botan-devel on April 9, subject 'Changing license to directly reflect contributors' (http://www.randombit.net/pipermail/botan-devel/2008-April/000527.html)
* Mostly revert 2f4fd18182d5a75c40cd831e7ee3c314be5c57d6, only keep thelloyd2008-03-101-1/+1
| | | | | updated dates on files that have actually changed this year. This makes the diff across versions readable again.
* Mass update of the copyright date. Honestly I don't know why I bother,lloyd2008-02-141-1/+1
| | | | | | | but might as well keep it up to date. And it's easier to do it once with a 'perl -pi' command than to update each file over time. Apologies to anyone looking at diffs.
* bit_ops.h no longer includes loadstor.hlloyd2007-10-191-1/+0
| | | | | | | | | Where loadstor.h was needed but only implicitly included via bit_ops.h, include it directly Add endian reversal functions to bit_ops.h Remove some unneeded includes in big_ops2.cpp and a few other files.
* Avoid C-style casts (as detected by GCC's -Wold-style-cast) and instead use lloyd2007-07-231-5/+5
| | | | static_cast or reinterpret_cast, as needed.
* Check in a working fix for the mem_pool issues encountered by some Visuallloyd2007-04-251-11/+1
| | | | Studio users.
* Revert the last change; it actually broke the memory allocators in alloyd2007-04-231-1/+1
| | | | fairly massive way.
* Fixes for Visual C++ 2005; it wasn't picking up the needed conversionlloyd2007-04-231-2/+3
| | | | from a void* to a Memory_Block, so call the constructor explicitly.
* Bump copyright year to 2007lloyd2007-01-201-1/+1
|
* Work around some strange Visual Studio bugs that popped up when compilinglloyd2007-01-081-22/+14
| | | | mem_pool.cpp with debug enabled.
* Do not allocate a block of memory in Pooling_Allocator::init(); this waslloyd2006-09-201-10/+0
| | | | | | | causing allocators that were never used to allocate (and thus, later deallocate) memory. This was causing a noticable slowdown when the mmap based allocator was in used (based on the strace output, this was mostly due to the calls to msync).
* When searching the block list, first try the last block we had a goodlloyd2006-09-111-4/+4
| | | | | | | | allocation from, rather than the block after that one. This helps the pathalogical case where there are many full blocks and some free blocks at the very end of the list (as then it would loop through each one, trying and failing to allocate from an already full block until it hit the end of the list again).
* Correctly deal with allocators added post-initialization. In particular,lloyd2006-09-111-9/+1
| | | | | | | | | | handle the case where an allocator is added that has the same name as one already registered. Flush the cached allocator pointer when the default is changed. Mark comparison operations in Pooling_Allocator::Memory_Block as inline; this seems to help the STL sort and binary search algorithms tremendously.
* Access the global configuration through an object reference insteadlloyd2006-07-011-1/+1
| | | | | of stand-alone functions. Store the configuration in a distinct object, rather than just a map inside the library state.
* More config.h fixeslloyd2006-07-011-1/+1
|
* Use preincrement instead of postincrement inside of some loops (mostlylloyd2006-06-191-1/+1
| | | | | for consistency with code that uses STL iterators, as these were mostly integer operations, though with one exception).
* Initial checkin1.5.6lloyd2006-05-181-0/+302