aboutsummaryrefslogtreecommitdiffstats
path: root/src/alloc
Commit message (Collapse)AuthorAgeFilesLines
* propagate from branch 'net.randombit.botan' (head ↵lloyd2010-03-101-1/+1
|\ | | | | | | | | | | 74e9e8642943d126a5e5efa5be1da8351f0fb6d7) to branch 'net.randombit.botan.c++0x' (head 24371f742c2a1c7e5f3aace364fbb21e01c94657)
| * Guard call to the allocator in deallocate() by checking if the alloclloyd2010-03-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | pointer was actually set. Otherwise, the following problem could occur if an allocator could not be found: init() will call Allocator::get, which throws an exception init() is called from the constructor of the subclasses (MemoryVector, etc) Since the constructor of MemoryRegion has already finished, its destructor will be called. ~MemoryRegion will call deallocate() deallocate() will then access a NULL pointer By guarding the call, the exception is propagated correctly.
* | propagate from branch 'net.randombit.botan' (head ↵lloyd2010-01-215-18/+10
|\ \ | |/ |/| | | | | | | 12382647ef0a28fcb11c824c77b670cc88a4f721) to branch 'net.randombit.botan.c++0x' (head b586a3286d2c4d547ad3add5af9df1455bf4b87b)
| * propagate from branch 'net.randombit.botan' (head ↵lloyd2009-12-1610-24/+32
| |\ | | | | | | | | | | | | | | | 744dccf92270cf16b80b50ee2759424c9866b256) to branch 'net.randombit.botan.c++0x' (head 2aa1acac1d05e8ea9991fe39015b1db9abc3b24e)
| * \ propagate from branch 'net.randombit.botan' (head ↵lloyd2009-11-175-18/+10
| |\ \ | | | | | | | | | | | | | | | | | | | | 0ac5a29496b4e50775827d9655c064f6d1c98813) to branch 'net.randombit.botan.c++0x' (head 3232da044d41756582b53da9d14c3ac07e9b2916)
| | * \ propagate from branch 'net.randombit.botan' (head ↵lloyd2009-11-171-30/+17
| | |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | cfb19182987fc95b2a8885584a38edb10b4709b3) to branch 'net.randombit.botan.c++0x' (head 1570877c463fed4b632bc49a5b5ee27c57de2cb5)
| | * | | Use auto for long iterator names, etc.lloyd2009-11-161-3/+3
| | | | | | | | | | | | | | | | | | | | It will be nice to convert to the range-based for loop once that's available.
| | * | | propagate from branch 'net.randombit.botan' (head ↵lloyd2009-11-025-15/+7
| | |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2773c2310e8c0a51975987a2dd6c5824c8d43882) to branch 'net.randombit.botan.c++0x' (head f13cf5d7e89706c882604299b508f356c20aae3a)
| | | * \ \ propagate from branch 'net.randombit.botan' (head ↵lloyd2009-09-172-2/+2
| | | |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 92e05ab242e4b6998d685961c53700534a673bce) to branch 'net.randombit.botan.c++0x' (head 27ce37b971ec5cb1f80a9a95b13d5a951b96653b)
| | | * | | | Remove dep on mutex module (doesn't exist here). Use initializer list in ↵lloyd2009-09-111-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | libstate.cpp
| | | * | | | propagate from branch 'net.randombit.botan' (head ↵lloyd2009-09-084-11/+7
| | | |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 5cadcc57872bef55226579df57349fe09a93d1f5) to branch 'net.randombit.botan.c++0x' (head d1747f0394aa4442e5b32b9102b830e1a86f0e5a)
| | | | * \ \ \ propagate from branch 'net.randombit.botan' (head ↵lloyd2009-07-215-8/+452
| | | | |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 95eb8083f5884531e5ca0667388f8a6fb6d05c41) to branch 'net.randombit.botan.c++0x' (head 56e105e678540c8bcafa4d0198c19a9489fbf8d1)
| | | | * | | | | Remove the mutex classes in favor of C++0x's std::mutex and std::lock_guardlloyd2009-04-014-11/+7
| | | | | | | | |
* | | | | | | | | Clean up exceptions. Remove some unused ones like Config_Error. Makelloyd2010-01-052-14/+1
| |_|_|_|_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Invalid_Argument just a typedef for std::invalid_argument. Make Botan::Exception a typedef for std::runtime_error. Make Memory_Exhaustion a public exception, and use it in other places where memory allocations can fail.
* | | | | | | | Make many more headers internal-only.lloyd2009-12-169-15/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes for the amalgamation generator for internal headers. Remove BOTAN_DLL exporting macros from all internal-only headers; the classes/functions there don't need to be exported, and avoiding the PIC/GOT indirection can be a big win. Add missing BOTAN_DLLs where necessary, mostly gfpmath and cvc For GCC, use -fvisibility=hidden and set BOTAN_DLL to the visibility __attribute__ to export those classes/functions.
* | | | | | | | Full working amalgamation build, plus internal-only headers concept.lloyd2009-12-163-18/+2
|/ / / / / / /
* | | | | | / Move most code that relies heavily on Filters into src/filters.lloyd2009-11-171-6/+0
| |_|_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove support for (unused) modset settings. Move tss, fpe, cryptobox, and aont to new dir constructs
* | | | | | Rename/remove some secmem member variables for better matching with STLlloyd2009-11-171-22/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | containers (specifically vector). Rename is_empty to empty Remove has_items Rename create to resize
* | | | | | Remove some Doxygen commentslloyd2009-11-171-8/+2
|/ / / / /
* | | | | Remove the 'realname' attribute on all modules and cc/cpu/os info files.lloyd2009-10-294-8/+0
| | | | | | | | | | | | | | | | | | | | | | | | | Pretty much useless and unused, except for listing the module names in build.h and the short versions totally suffice for that.
* | | | | Remove all exception specifications. The way these are designed in C++ islloyd2009-10-222-6/+6
| |_|_|/ |/| | | | | | | | | | | | | | | | | | | 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.
* | | | Split up util.h into 3 fileslloyd2009-09-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | - rounding.h (round_up, round_down) - workfactor.h (dl_work_factor) - timer.h (system_time) And update all users of the previous util.h
* | | | Move memory locking function decls to mlock.hlloyd2009-09-171-1/+1
|/ / / | | | | | | | | | Inline round_up and round_down
* | / Add support for Dragonfly BSD (a fork of FreeBSD).lloyd2009-07-251-0/+1
| |/ |/| | | | | Contributed by Patrick Georgi
* | Move some files around to break up dependencies between directorieslloyd2009-07-162-0/+439
| |
* | Add a script that reads the output of print_deps.py and rewriteslloyd2009-07-153-8/+13
|/ | | | | | the info.txt files with the right module dependencies. Apply it across the codebase.
* Thomas Moschny passed along a request from the Fedora packagers which camelloyd2009-03-307-111/+125
| | | | | | | | | | | | | | | up during the Fedora submission review, that each source file include some text about the license. One handy Perl script later and each file now has the line Distributed under the terms of the Botan license after the copyright notices. While I was in there modifying every file anyway, I also stripped out the remainder of the block comments (lots of astericks before and after the text); this is stylistic thing I picked up when I was first learning C++ but in retrospect it is not a good style as the structure makes it harder to modify comments (with the result that comments become fewer, shorter and are less likely to be updated, which are not good things).
* Check the return value of lseek in the mmap allocatorlloyd2009-03-271-1/+3
|
* Rickard Bondesson reported on botan-devel about some problems buildinglloyd2008-12-021-8/+0
| | | | | | | | | | | | | | | | | | | | on Solaris 10 with GCC 3.4.3. First, remove the definition of _XOPEN_SOURCE_EXTENDED=1 in mmap_mem.cpp and unix_cmd.cpp, because apparently on Solaris defining this macro breaks C++ compilation entirely with GCC: http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=6395191 In es_egd.cpp and es_dev.cpp, include <fcntl.h> to get the declaration of open(), which is apparently where open(2) lives on Solaris - this matches the include the *BSD man pages for open(2) show, though AFAIK the BSDs all compiled fine without it (probably due to greater efforts to be source-compatible with Linux systems by *BSD developers). I have not been able to test these changes personally on Solaris but Rickard reports that with these changes everything compiles OK. Update lib version to 1.8.0-pre. ZOMG. Finally.
* In Pooling_Allocator::get_more_core, limit in_bytes to at most 1 MiB tolloyd2008-11-242-3/+4
| | | | avoid a potential integer overflow in the multiplication. Fixes bugid 27
* Split the last parts of the 'core' modulelloyd2008-11-083-0/+31
| | | | Add some missing info.txts
* Move allocate.h with related code in alloclloyd2008-11-081-0/+35
|
* Continue to dismantle the core module (aka ball of mud), moving allocatorlloyd2008-11-084-0/+473
| | | | code to alloc/ subdirs
* Add BOTAN_DLL macro to public class definitions that were missing it.lloyd2008-10-091-1/+1
|
* Move allocator base code into core/, alloc_mmap to alloc/lloyd2008-09-303-0/+181