memory/ram - initialize with zeroes

This commit is contained in:
madmaurice 2023-08-29 13:44:29 +02:00
parent af5d478f40
commit e15630fb80

View file

@ -1,7 +1,9 @@
#include "ram.h"
#include <cstring>
RAM::RAM(u16 size) : size(size), readonly(false) {
memory = new u8[size];
std::memset(memory, 0, sizeof(u8) * size);
}
RAM::RAM(u8* memory, u16 size, bool readonly)