Skip to content

Commit 686a7a3

Browse files
CsantucciChris Jakeman
authored andcommitted
Update RAM measurements for 64-bit
1 parent abd8ccf commit 686a7a3

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

Source/RunActivity/Viewer3D/Popups/HUDWindow.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1425,11 +1425,11 @@ struct PROCESS_MEMORY_COUNTERS
14251425
readonly ulong ProcessVirtualAddressLimit;
14261426
#endregion
14271427

1428-
public uint GetWorkingSetSize()
1428+
public ulong GetWorkingSetSize()
14291429
{
14301430
// Get memory usage (working set).
14311431
GetProcessMemoryInfo(ProcessHandle, out ProcessMemoryCounters, ProcessMemoryCounters.Size);
1432-
return (uint)ProcessMemoryCounters.WorkingSetSize;
1432+
return (ulong)ProcessMemoryCounters.WorkingSetSize;
14331433
}
14341434

14351435
public ulong GetVirtualAddressLimit()

Source/RunActivity/Viewer3D/Viewer.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ enum VisibilityState
225225
public bool DontLoadDayTextures; // Checkbox set and time of day allows not to load textures
226226
public bool NightTexturesNotLoaded; // At least one night texture hasn't been loaded
227227
public bool DayTexturesNotLoaded; // At least one day texture hasn't been loaded
228-
public long LoadMemoryThreshold; // Above this threshold loader doesn't bulk load day or night textures
228+
public ulong LoadMemoryThreshold; // Above this threshold loader doesn't bulk load day or night textures
229229
public bool tryLoadingNightTextures = false;
230230
public bool tryLoadingDayTextures = false;
231231

@@ -414,7 +414,7 @@ public void Restore(BinaryReader inf)
414414
CabXOffsetPixels = inf.ReadInt32();
415415
NightTexturesNotLoaded = inf.ReadBoolean();
416416
DayTexturesNotLoaded = inf.ReadBoolean();
417-
LoadMemoryThreshold = (long)HUDWindow.GetVirtualAddressLimit() - 512 * 1024 * 1024;
417+
LoadMemoryThreshold = (ulong)HUDWindow.GetVirtualAddressLimit() - 512 * 1024 * 1024;
418418
tryLoadingNightTextures = true;
419419
tryLoadingDayTextures = true;
420420

@@ -514,7 +514,7 @@ internal void Initialize()
514514
if (Simulator.Settings.ConditionalLoadOfDayOrNightTextures) // We need to compute sun height only in this case
515515
{
516516
MaterialManager.LoadPrep();
517-
LoadMemoryThreshold = (long)HUDWindow.GetVirtualAddressLimit() - 512 * 1024 * 1024;
517+
LoadMemoryThreshold = (ulong)HUDWindow.GetVirtualAddressLimit() - 512 * 1024 * 1024;
518518
}
519519
Load();
520520

0 commit comments

Comments
 (0)