carb::memory::testReadable¶
Defined in carb/memory/Util.h
-
inline bool
carb::memory
::
testReadable
(const void *mem)¶ Tests if a memory word (size_t) can be read from an address without crashing.
Note
This is not a particularly efficient function and should not be depended on for performance.
- Parameters
mem – The address to attempt to read
- Returns
true
if a value could be read successfully,false
if attempting to read the value would cause an access violation or SIGSEGV.