aboutsummaryrefslogtreecommitdiff
path: root/src/test/allocator_tests.cpp
Commit message (Collapse)AuthorAgeFilesLines
* 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.