diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/pal/src/map/virtual.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/pal/src/map/virtual.cpp b/src/pal/src/map/virtual.cpp index ca27b7390c..1b457fbf36 100644 --- a/src/pal/src/map/virtual.cpp +++ b/src/pal/src/map/virtual.cpp @@ -107,7 +107,7 @@ namespace VirtualMemoryLogging // An entry in the in-memory log struct LogRecord { - LONG RecordId; + ULONG RecordId; DWORD Operation; LPVOID CurrentThread; LPVOID RequestedAddress; @@ -118,14 +118,14 @@ namespace VirtualMemoryLogging }; // Maximum number of records in the in-memory log - const LONG MaxRecords = 128; + const ULONG MaxRecords = 128; // Buffer used to store the logged data volatile LogRecord logRecords[MaxRecords]; // Current record number. Use (recordNumber % MaxRecords) to determine // the current position in the circular buffer. - volatile LONG recordNumber = 0; + volatile ULONG recordNumber = 0; // Record an entry in the in-memory log void LogVaOperation( @@ -137,7 +137,7 @@ namespace VirtualMemoryLogging IN LPVOID returnedAddress, IN BOOL result) { - LONG i = InterlockedIncrement(&recordNumber) - 1; + ULONG i = (ULONG)InterlockedIncrement((LONG*)&recordNumber) - 1; LogRecord* curRec = (LogRecord*)&logRecords[i % MaxRecords]; curRec->RecordId = i; |