aboutsummaryrefslogtreecommitdiff
path: root/src/support
AgeCommit message (Collapse)Author
2016-11-28Fix some typosfsb4000
2016-11-02LockedPool: avoid quadratic-time allocationKaz Wesley
Use separate maps for used/free chunks to avoid linear scan through alloced chunks for each alloc.
2016-11-02LockedPool: fix explosion for illegal-sized allocKaz Wesley
Check for unreasonable alloc size in LockedPool rather than lancing through new Arenas until we improbably find one worthy of the quixotic request or the system can support no more Arenas.
2016-11-02Do not shadow variable, use deprecated MAP_ANON if MAP_ANONYMOUS is not defined.Pavel Janík
2016-10-27support: Add LockedPoolWladimir J. van der Laan
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.
2016-10-19wallet: Get rid of LockObject and UnlockObject calls in key.hWladimir J. van der Laan
Replace these with vectors allocated from the secure allocator. This avoids mlock syscall churn on stack pages, as well as makes it possible to get rid of these functions. Please review this commit and the previous one carefully that no `sizeof(vectortype)` remains in the memcpys and memcmps usage (ick!), and `.data()` or `&vec[x]` is used as appropriate instead of &vec.
2016-09-27Do not shadow variablesPavel Janík
2015-12-13Bump copyright headers to 2015MarcoFalke
2015-05-15Remove assertion from ~LockedPageManagerWladimir J. van der Laan
This assertion will occur any time that the client quits without shutting down properly due to an error condition. As the user will report this error instead of the error that was the root cause, it is better to remove it.
2015-04-20ensure consistent header comment naming conventionsPhilip Kaufmann
- BITCOIN_FOLDER_SUBFOLDER_FILENAME_H
2015-03-20allocators: split allocators and pagelockerCory Fields
Pagelocker is only needed for secure (usually wallet) operations, so don't make the zero-after-free allocator depend on it.
2015-02-15openssl: abstract out OPENSSL_cleanseCory Fields
This makes it easier for us to replace it if desired, since it's now only in one spot. Also, it avoids the openssl include from allocators.h, which essentially forced openssl to be included from every compilation unit.