mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-23 19:16:21 +00:00
NDS: Protection against FastRam (ITCM) allocation failure
svn-id: r32136
This commit is contained in:
parent
765f976008
commit
b619c6ce19
@ -2364,9 +2364,13 @@ u8 fastRamData[FAST_RAM_SIZE] ITCM_DATA;
|
||||
|
||||
void* fastRamAlloc(int size) {
|
||||
// return malloc(size);
|
||||
void* result = (void *) fastRamPointer;
|
||||
void* result = fastRamPointer;
|
||||
fastRamPointer += size;
|
||||
return (void *) (result);
|
||||
if(fastRamPointer > fastRamData + FAST_RAM_SIZE) {
|
||||
consolePrintf("FastRam (ITCM) allocation failed!\n");
|
||||
return NULL;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
void fastRamReset() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user