XOR encoded next_object
This commit adds a simple XOR encoding to the next_object pointer in FreeObjects. This removes the trivial way of getting hold of a physical address from the system by observing the free list pointers in deallocated objects.
This commit is contained in:
committed by
Matthew Parkinson
parent
b69505fc5d
commit
81bf341732
@@ -130,4 +130,13 @@ check_client_impl(bool test, const char* const str)
|
||||
# define check_client(test, str) check_client_impl(test, str)
|
||||
#else
|
||||
# define check_client(test, str)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
namespace snmalloc
|
||||
{
|
||||
#ifdef SNMALLOC_CHECK_CLIENT
|
||||
static constexpr bool CHECK_CLIENT = true;
|
||||
#else
|
||||
static constexpr bool CHECK_CLIENT = false;
|
||||
#endif
|
||||
} // namespace snmalloc
|
||||
|
||||
Reference in New Issue
Block a user