mirror of
https://github.com/GTAmodding/re3.git
synced 2024-11-15 07:28:59 +00:00
Save current usable memory for Switch application
This commit is contained in:
parent
5cab196718
commit
a7b38e1b34
1 changed files with 3 additions and 2 deletions
|
@ -560,14 +560,15 @@ psInitialize(void)
|
||||||
_dwMemAvailPhys = (uint64_t)(vm_stat.free_count * page_size);
|
_dwMemAvailPhys = (uint64_t)(vm_stat.free_count * page_size);
|
||||||
debug("Physical memory size %llu\n", _dwMemAvailPhys);
|
debug("Physical memory size %llu\n", _dwMemAvailPhys);
|
||||||
debug("Available physical memory %llu\n", size);
|
debug("Available physical memory %llu\n", size);
|
||||||
|
#elif defined (__SWITCH__)
|
||||||
|
svcGetInfo(&_dwMemAvailPhys, 7, 0xffff8001, 0);
|
||||||
|
debug("Physical memory size %llu\n", _dwMemAvailPhys);
|
||||||
#else
|
#else
|
||||||
#ifndef __SWITCH__
|
|
||||||
struct sysinfo systemInfo;
|
struct sysinfo systemInfo;
|
||||||
sysinfo(&systemInfo);
|
sysinfo(&systemInfo);
|
||||||
_dwMemAvailPhys = systemInfo.freeram;
|
_dwMemAvailPhys = systemInfo.freeram;
|
||||||
debug("Physical memory size %u\n", systemInfo.totalram);
|
debug("Physical memory size %u\n", systemInfo.totalram);
|
||||||
debug("Available physical memory %u\n", systemInfo.freeram);
|
debug("Available physical memory %u\n", systemInfo.freeram);
|
||||||
#endif
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
TheText.Unload();
|
TheText.Unload();
|
||||||
|
|
Loading…
Reference in a new issue