Commit 0ecfe235 by Copybara-Service

Merge pull request #1393 from AtariDreams:cpp

PiperOrigin-RevId: 511696041
Change-Id: I77a87c8721f64e0d9e9a70e08a7127312488ff21
parents 2f8f87e5 fd02f6a4
...@@ -550,7 +550,7 @@ static void *DoAllocWithArena(size_t request, LowLevelAlloc::Arena *arena) { ...@@ -550,7 +550,7 @@ static void *DoAllocWithArena(size_t request, LowLevelAlloc::Arena *arena) {
size_t new_pages_size = RoundUp(req_rnd, arena->pagesize * 16); size_t new_pages_size = RoundUp(req_rnd, arena->pagesize * 16);
void *new_pages; void *new_pages;
#ifdef _WIN32 #ifdef _WIN32
new_pages = VirtualAlloc(0, new_pages_size, new_pages = VirtualAlloc(nullptr, new_pages_size,
MEM_RESERVE | MEM_COMMIT, PAGE_READWRITE); MEM_RESERVE | MEM_COMMIT, PAGE_READWRITE);
ABSL_RAW_CHECK(new_pages != nullptr, "VirtualAlloc failed"); ABSL_RAW_CHECK(new_pages != nullptr, "VirtualAlloc failed");
#else #else
......
...@@ -159,7 +159,7 @@ static double GetNominalCPUFrequency() { ...@@ -159,7 +159,7 @@ static double GetNominalCPUFrequency() {
DWORD type = 0; DWORD type = 0;
DWORD data = 0; DWORD data = 0;
DWORD data_size = sizeof(data); DWORD data_size = sizeof(data);
auto result = RegQueryValueExA(key, "~MHz", 0, &type, auto result = RegQueryValueExA(key, "~MHz", nullptr, &type,
reinterpret_cast<LPBYTE>(&data), &data_size); reinterpret_cast<LPBYTE>(&data), &data_size);
RegCloseKey(key); RegCloseKey(key);
if (result == ERROR_SUCCESS && type == REG_DWORD && if (result == ERROR_SUCCESS && type == REG_DWORD &&
......
...@@ -115,7 +115,7 @@ bool RemoveSymbolDecorator(int ticket); ...@@ -115,7 +115,7 @@ bool RemoveSymbolDecorator(int ticket);
// Remove all installed decorators. Returns true if successful, false if // Remove all installed decorators. Returns true if successful, false if
// symbolization is currently in progress. // symbolization is currently in progress.
bool RemoveAllSymbolDecorators(void); bool RemoveAllSymbolDecorators();
// Registers an address range to a file mapping. // Registers an address range to a file mapping.
// //
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment