32 byte align some memory

This commit is contained in:
dborth 2009-02-07 02:45:33 +00:00
parent d1062098ab
commit 931f7553b0
2 changed files with 3 additions and 2 deletions

View File

@ -117,7 +117,7 @@ void ResetBrowser()
browserList = NULL;
}
// set aside space for 1 entry
browserList = (BROWSERENTRY *)malloc(sizeof(BROWSERENTRY));
browserList = (BROWSERENTRY *)memalign(32, sizeof(BROWSERENTRY));
memset(browserList, 0, sizeof(BROWSERENTRY));
}

View File

@ -12,6 +12,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <malloc.h>
#include "unzip.h"
#include "Util.h"
@ -680,7 +681,7 @@ extern bool gbUpdateSizes();
bool LoadGBROM(int method)
{
gbRom = (u8 *)malloc(1024*1024*4); // allocate 4 MB to GB ROM
gbRom = (u8 *)memalign(32, 1024*1024*4); // allocate 4 MB to GB ROM
bios = (u8 *)calloc(1,0x100);
systemSaveUpdateCounter = SYSTEM_SAVE_NOT_UPDATED;