VideoCommon: Abort texture prefetching on low RAM

There is no nice way to correctly "detect" the "used" memory, so we just say
we're fine to use 50% of the physical memory for custom textures.

This will fix out-of-memory crashes, but we still might run into swapping issues.
This commit is contained in:
degasus
2015-05-16 15:26:11 +02:00
parent 242f7d964d
commit 562b9d4a9f
3 changed files with 40 additions and 0 deletions

View File

@ -16,6 +16,7 @@ void ReadProtectMemory(void* ptr, size_t size);
void WriteProtectMemory(void* ptr, size_t size, bool executable = false);
void UnWriteProtectMemory(void* ptr, size_t size, bool allowExecute = false);
std::string MemUsage();
size_t MemPhysical();
void GuardMemoryMake(void* ptr, size_t size);
void GuardMemoryUnmake(void* ptr, size_t size);