memory/ram - initialize with zeroes
This commit is contained in:
parent
af5d478f40
commit
e15630fb80
1 changed files with 2 additions and 0 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue