N64: reuse a particular buffer instead of recreating it on every rewind state capture. this change by itself does not seem to be sufficient to avoid outofmemory exceptions

This commit is contained in:
goyuken 2013-07-30 00:01:32 +00:00
parent 58087b24c9
commit 3b7f2a65a6
1 changed files with 2 additions and 1 deletions

View File

@ -188,9 +188,10 @@ namespace BizHawk.Emulation.Consoles.Nintendo.N64
LoadStateBinary(new BinaryReader(new MemoryStream(state)));
}
byte[] SaveStatePrivateBuff = new byte[16788288 + 1024];
public void SaveStateBinary(BinaryWriter writer)
{
byte[] data = new byte[16788288 + 1024];
byte[] data = SaveStatePrivateBuff;
int bytes_used = api.SaveState(data);
writer.Write(data.Length);