X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?p=pcsx_rearmed.git;a=blobdiff_plain;f=libpcsxcore%2Fpsxmem.c;h=898eac9c14f962bbe7fc94ac27ce94433e6d5f1f;hp=cc27552aa6f52da26314bc2db06076dbaa9b9557;hb=ee78346e30720ddb3f4c97b6598bdc6dc7257f98;hpb=f95a77f74f9608f9c63780fee20fcc5255042ac3 diff --git a/libpcsxcore/psxmem.c b/libpcsxcore/psxmem.c index cc27552a..898eac9c 100644 --- a/libpcsxcore/psxmem.c +++ b/libpcsxcore/psxmem.c @@ -73,10 +73,12 @@ int psxMemInit() { psxP = &psxM[0x200000]; psxH = &psxM[0x210000]; - psxR = (s8 *)malloc(0x00080000); + psxR = mmap((void *)0x9fc00000, 0x80000, + PROT_WRITE | PROT_READ, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); if (psxMemRLUT == NULL || psxMemWLUT == NULL || - psxM != (void *)0x80000000 || psxP == NULL || psxH == NULL) { + psxM != (void *)0x80000000 || psxR != (void *)0x9fc00000 || + psxP == NULL || psxH == NULL) { SysMessage(_("Error allocating memory!")); return -1; } @@ -132,8 +134,8 @@ void psxMemReset() { void psxMemShutdown() { munmap(psxM, 0x00220000); + munmap(psxR, 0x80000); - free(psxR); free(psxMemRLUT); free(psxMemWLUT); }