aboutsummaryrefslogtreecommitdiff
path: root/src/test/allocator_tests.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Update copyright headers to 2018DrahtBot2018-07-271-1/+1
|
* test: Fix sign for expected valuesKarl-Johan Alm2018-04-111-2/+2
| | | | A number of BOOST_CHECK_EQUAL calls would result in warnings about signs.
* Bugfix: Include <memory> for std::unique_ptrLuke Dashjr2018-04-021-0/+2
|
* Increment MIT Licence copyright header year on files modified in 2017Akira Takizawa2018-01-031-1/+1
|
* scripted-diff: Replace #include "" with #include <> (ryanofsky)MeshCollider2017-11-161-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -BEGIN VERIFY SCRIPT- for f in \ src/*.cpp \ src/*.h \ src/bench/*.cpp \ src/bench/*.h \ src/compat/*.cpp \ src/compat/*.h \ src/consensus/*.cpp \ src/consensus/*.h \ src/crypto/*.cpp \ src/crypto/*.h \ src/crypto/ctaes/*.h \ src/policy/*.cpp \ src/policy/*.h \ src/primitives/*.cpp \ src/primitives/*.h \ src/qt/*.cpp \ src/qt/*.h \ src/qt/test/*.cpp \ src/qt/test/*.h \ src/rpc/*.cpp \ src/rpc/*.h \ src/script/*.cpp \ src/script/*.h \ src/support/*.cpp \ src/support/*.h \ src/support/allocators/*.h \ src/test/*.cpp \ src/test/*.h \ src/wallet/*.cpp \ src/wallet/*.h \ src/wallet/test/*.cpp \ src/wallet/test/*.h \ src/zmq/*.cpp \ src/zmq/*.h do base=${f%/*}/ relbase=${base#src/} sed -i "s:#include \"\(.*\)\"\(.*\):if test -e \$base'\\1'; then echo \"#include <\"\$relbase\"\\1>\\2\"; else echo \"#include <\\1>\\2\"; fi:e" $f done -END VERIFY SCRIPT-
* Use the override specifier (C++11) where we expect to be overriding the ↵practicalswift2017-06-281-3/+3
| | | | virtual function of a base class
* Increment MIT Licence copyright header year on files modified in 2016isle29832016-12-311-1/+1
| | | | | | Edited via: $ contrib/devtools/copyright_header.py update .
* LockedPool: avoid quadratic-time allocationKaz Wesley2016-11-021-2/+2
| | | | | Use separate maps for used/free chunks to avoid linear scan through alloced chunks for each alloc.
* LockedPool: test handling of invalid allocationsKaz Wesley2016-11-021-0/+10
| | | | (Currently fails due to bug)
* support: Add LockedPoolWladimir J. van der Laan2016-10-271-88/+192
| | | | | | | | | | | | | | Add a pool for locked memory chunks, replacing LockedPageManager. This is something I've been wanting to do for a long time. The current approach of locking objects where they happen to be on the stack or heap in-place causes a lot of mlock/munlock system call overhead, slowing down any handling of keys. Also locked memory is a limited resource on many operating systems (and using a lot of it bogs down the system), so the previous approach of locking every page that may contain any key information (but also other information) is wasteful.
* Bump copyright headers to 2015MarcoFalke2015-12-131-1/+1
|
* allocators: split allocators and pagelockerCory Fields2015-03-201-1/+1
| | | | | Pagelocker is only needed for secure (usually wallet) operations, so don't make the zero-after-free allocator depend on it.
* tests: add a BasicTestingSetup and apply to all testsWladimir J. van der Laan2015-03-121-1/+2
| | | | | | | | Make sure that chainparams and logging is properly initialized. Doing this for every test may be overkill, but this initialization is so simple that that does not matter. This should fix the travis issues.
* Remove references to X11 licenceMichael Ford2014-12-161-1/+1
|
* Split up util.cpp/hWladimir J. van der Laan2014-08-261-0/+2
| | | | | | | | | | | | | | | | Split up util.cpp/h into: - string utilities (hex, base32, base64): no internal dependencies, no dependency on boost (apart from foreach) - money utilities (parsesmoney, formatmoney) - time utilities (gettime*, sleep, format date): - and the rest (logging, argument parsing, config file parsing) The latter is basically the environment and OS handling, and is stripped of all utility functions, so we may want to rename it to something else than util.cpp/h for clarity (Matt suggested osinterface). Breaks dependency of sha256.cpp on all the things pulled in by util.
* Add licenses for tests and test dataWladimir J. van der Laan2014-03-181-1/+3
| | | | | | | | - Add license headers to source files (years based on commit dates) in `src/test` as well as `qa` - Add `README.md` to `src/test/data` specifying MIT license Fixes #3848
* Cleanup code using forward declarations.Brandon Dahler2013-11-101-3/+3
| | | | | | | | | Use misc methods of avoiding unnecesary header includes. Replace int typedefs with int##_t from stdint.h. Replace PRI64[xdu] with PRI[xdu]64 from inttypes.h. Normalize QT_VERSION ifs where possible. Resolve some indirect dependencies as direct ones. Remove extern declarations from .cpp files.
* Handle locked pages more robustly (Fixes issue #1462)Wladimir J. van der Laan2012-08-231-0/+115
Memory locks do not stack, that is, pages which have been locked several times by calls to mlock() will be unlocked by a single call to munlock(). This can result in keying material ending up in swap when those functions are used naively. In this commit a class "LockedPageManager" is added that simulates stacking memory locks by keeping a counter per page.