// Windows 8 x86
typedef struct _PO_MEMORY_IMAGE // 38 elements, 0x2C8 bytes (sizeof)
{
/*0x000*/ ULONG32 Signature;
/*0x004*/ ULONG32 ImageType;
/*0x008*/ ULONG32 CheckSum;
/*0x00C*/ ULONG32 LengthSelf;
/*0x010*/ ULONG32 PageSelf;
/*0x014*/ ULONG32 PageSize;
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <absl/base/internal/endian.h> | |
#include <algorithm> | |
#include <cstddef> | |
#include <cstdint> | |
#include <type_traits> | |
#if __has_include("bit") | |
#include <bit> | |
#if defined(__cpp_lib_endian) && __cpp_lib_endian >= 201907 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <algorithm> | |
#include <bit> | |
#include <cstddef> | |
#include <type_traits> | |
template <typename T, std::endian endianess, | |
typename = std::enable_if_t<std::is_scalar_v<T>>> | |
class endian { | |
public: | |
constexpr endian() noexcept = default; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
constexpr size_t hardware_destructive_interference_size = []() -> size_t { | |
#ifdef __cpp_lib_hardware_interference_size | |
return std::hardware_destructive_interference_size; | |
#endif | |
// The following values were taken from those commonly used in Google | |
// open source projects as defined with their CACHELINE_SIZE macro | |
#if defined(__i386__) || defined(__x86_64__) | |
return 64; |
I hereby claim:
- I am jtsylve on github.
- I am jtsylve (https://keybase.io/jtsylve) on keybase.
- I have a public key ASDBDxRhrul5aq-HlsONvkiZbC88rk-JPfmiywDjD6m4mQo
To claim this, I am signing this object: