aboutsummaryrefslogtreecommitdiffstats
path: root/src/alloc/alloc_mmap
Commit message (Collapse)AuthorAgeFilesLines
* Fairly huge update that replaces the old secmem types with std::vectorlloyd2012-05-183-205/+0
| | | | | | using a custom allocator. Currently our allocator just does new/delete with a memset before deletion, and the mmap and mlock allocators have been removed.
* propagate from branch 'net.randombit.botan.tls-state-machine' (head ↵lloyd2012-04-251-2/+4
|\ | | | | | | | | | | a4741cd07f50a9e1b29b0dd97c6fb8697c038ade) to branch 'net.randombit.botan.cxx11' (head 116e5ff139c07000be431e07d3472cc8f3919b91)
| * Avoid a few maintainer mode flag warnings. Remove -Weffc++ from thelloyd2012-04-201-2/+4
| | | | | | | | | | list of maintainer mode flags. It produces some very useful warnings, but also a lot of noisy junk that I really don't care about.
* | Use nullptrlloyd2011-07-121-1/+1
| |
* | propagate from branch 'net.randombit.botan' (head ↵lloyd2011-06-131-4/+0
|\ \ | |/ |/| | | | | | | 150bd11dd8090559ee1e83394b8283bf93a018de) to branch 'net.randombit.botan.c++0x' (head 7480693bb3f1e8a4e039a3e7ba3d9a7007f9730e)
| * propagate from branch 'net.randombit.botan' (head ↵lloyd2010-10-131-4/+0
| |\ | | | | | | | | | | | | | | | 2898d79f992f27a328a3e41d34b46eb1052da0de) to branch 'net.randombit.botan.c++0x' (head 6cba76268fd69a73195760c021b7f881b8a6552c)
| | * propagate from branch 'net.randombit.botan' (head ↵lloyd2010-09-071-2/+2
| | |\ | | | | | | | | | | | | | | | | | | | | fb78974f57bc3065d8537ebeb5210c86e74e9bb1) to branch 'net.randombit.botan.c++0x' (head dcb30c0029c7e44a75d0d8b859447a6c9df97cde)
| | * \ propagate from branch 'net.randombit.botan' (head ↵lloyd2010-06-172-12/+22
| | |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | 294e2082ce9231d6165276e2f2a4153a0116aca3) to branch 'net.randombit.botan.c++0x' (head 0b695fad10f924601e07b009fcd781191fafcb28)
| | * \ \ propagate from branch 'net.randombit.botan' (head ↵lloyd2009-12-163-5/+11
| | |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 744dccf92270cf16b80b50ee2759424c9866b256) to branch 'net.randombit.botan.c++0x' (head 2aa1acac1d05e8ea9991fe39015b1db9abc3b24e)
| | * \ \ \ propagate from branch 'net.randombit.botan' (head ↵lloyd2009-11-171-1/+0
| | |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 0ac5a29496b4e50775827d9655c064f6d1c98813) to branch 'net.randombit.botan.c++0x' (head 3232da044d41756582b53da9d14c3ac07e9b2916)
| | | * \ \ \ propagate from branch 'net.randombit.botan' (head ↵lloyd2009-11-021-1/+0
| | | |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2773c2310e8c0a51975987a2dd6c5824c8d43882) to branch 'net.randombit.botan.c++0x' (head f13cf5d7e89706c882604299b508f356c20aae3a)
| | | | * \ \ \ propagate from branch 'net.randombit.botan' (head ↵lloyd2009-09-081-1/+0
| | | | |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 5cadcc57872bef55226579df57349fe09a93d1f5) to branch 'net.randombit.botan.c++0x' (head d1747f0394aa4442e5b32b9102b830e1a86f0e5a)
| | | | | * \ \ \ propagate from branch 'net.randombit.botan' (head ↵lloyd2009-07-211-0/+4
| | | | | |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-011-1/+0
| | | | | | | | | |
* | | | | | | | | | Write zeros in 4K blockslloyd2011-06-071-7/+9
|/ / / / / / / / /
* | | | | | | | | s/u32bit/size_t/ in alloclloyd2010-10-122-6/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also handle partial writes in alloc_mmap
* | | | | | | | | Use a full write instead of seek+write to create a sparselloyd2010-10-121-9/+7
| |_|_|_|_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | file. FreeBSD's man page for mmap warns that using NOSYNC with sparse files causes problems. Closes PR 30
* | | | | | | | Cast the first argument to msync, munmap, mlock, and munlock to char*lloyd2010-09-071-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | to fix compilation on Solaris. Everybody else, including POSIX.1, uses void* here, but as usual Solaris likes to be special.
* | | | | | | | Doxygenlloyd2010-06-211-1/+4
| |_|_|_|_|_|/ |/| | | | | |
* | | | | | | More Doxygen fixeslloyd2010-06-151-2/+5
| | | | | | |
* | | | | | | Change how alloc_mmap's TemporaryFile class works. Don't exposelloyd2010-06-131-10/+17
| |_|_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | the name at all; instead unlink it at the end of the constructor, so by the time it is fully constructed it is purely an anonymous file descriptor. mkstemp has a weird interface and returns the final name of the file in its template argument. This prevented us from using a std::string, since c_str's return is const (and we can't use &string[0], because that might not be NULL-terminated). This previously required doing nasty things like explicit new/delete and using strcpy (the strcpy was what got me started on looking at this; OpenBSD complains about it, so I was trying to figure out a good way to remove it). Instead, use the idea from http://www.gotw.ca/gotw/042.htm, and use a std::vector to hold the mkstemp argument/result. That works consistently everywhere, and we don't need to rely on strcpy, and don't have to worry about memory leaks either. Only minor nit is having to add an explicit NULL terminator as the std::string doesn't contain it.
* | | | | | Make many more headers internal-only.lloyd2009-12-163-5/+11
|/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* / / / / 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
* / / / Remove the 'realname' attribute on all modules and cc/cpu/os info files.lloyd2009-10-291-2/+0
|/ / / | | | | | | | | | | | | Pretty much useless and unused, except for listing the module names in build.h and the short versions totally suffice for that.
* | / Add support for Dragonfly BSD (a fork of FreeBSD).lloyd2009-07-251-0/+1
| |/ |/| | | | | Contributed by Patrick Georgi
* | Add a script that reads the output of print_deps.py and rewriteslloyd2009-07-151-0/+4
|/ | | | | | 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-302-20/+24
| | | | | | | | | | | | | | | 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.
* 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