support: Add LockedPool
commit4536148b15595229d0563fb60913b23cb78788ed
authorWladimir J. van der Laan <laanwj@gmail.com>
Sun, 18 Sep 2016 07:55:14 +0000 (18 09:55 +0200)
committerWladimir J. van der Laan <laanwj@gmail.com>
Thu, 27 Oct 2016 11:17:25 +0000 (27 13:17 +0200)
treea59197c39e82d2d16e78ed85940e18227c4105b5
parentf4d1fc259b5a62580d952c180b1189ccaa6af1bc
support: Add LockedPool

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.
src/Makefile.am
src/support/allocators/secure.h
src/support/lockedpool.cpp [new file with mode: 0644]
src/support/lockedpool.h [new file with mode: 0644]
src/support/pagelocker.cpp [deleted file]
src/support/pagelocker.h [deleted file]
src/test/allocator_tests.cpp