1
0
Fork 0

Fix NULL issues in memory.cpp

There is no sense in testing the 'MemBase' pointer against null, as the memory was allocated
using the 'new' operator, which throws.
This commit is contained in:
krcroft 2020-01-16 14:48:43 -08:00 committed by Patryk Obara
parent fb6e0e88bb
commit 5da5c2931c

View file

@ -564,9 +564,6 @@ public:
LOG_MSG("Stick with the default values unless you are absolutely certain.");
}
MemBase = new Bit8u[memsize*1024*1024];
if (!MemBase) E_Exit("Can't allocate main memory of %d MB",memsize);
/* Clear the memory, as new doesn't always give zeroed memory
* (Visual C debug mode). We want zeroed memory though. */
memset((void*)MemBase,0,memsize*1024*1024);
memory.pages = (memsize*1024*1024)/4096;
/* Allocate the data for the different page information blocks */