| 24 | #if defined(_WIN32) |
| 25 | |
| 26 | CryptoNightContext::CryptoNightContext() { |
| 27 | data = VirtualAlloc(nullptr, MAP_SIZE, MEM_COMMIT, PAGE_READWRITE); |
| 28 | if (data == nullptr) |
| 29 | throw std::bad_alloc(); |
| 30 | } |
| 31 | |
| 32 | CryptoNightContext::~CryptoNightContext() { |
| 33 | if (!VirtualFree(data, 0, MEM_RELEASE)) |
nothing calls this directly
no outgoing calls
no test coverage detected