mirror of
https://github.com/Fledge68/WiiFlow_Lite.git
synced 2025-01-11 19:39:09 +01:00
-changed a few things in mem2 memory management again (hopefully
it doesnt break everything :P)
This commit is contained in:
parent
cabfc9b51d
commit
3f79b1f8e0
@ -6,14 +6,12 @@
|
|||||||
|
|
||||||
#include "lockMutex.hpp"
|
#include "lockMutex.hpp"
|
||||||
|
|
||||||
#define IOS_RELOAD_AREA 0x90200000
|
|
||||||
|
|
||||||
void CMEM2Alloc::init(unsigned int size)
|
void CMEM2Alloc::init(unsigned int size)
|
||||||
{
|
{
|
||||||
m_baseAddress = (SBlock *) std::max(((u32)SYS_GetArena2Lo() + 31) & ~31, IOS_RELOAD_AREA);
|
m_baseAddress = (SBlock *)(((u32)SYS_GetArena2Lo() + 31) & ~31);
|
||||||
m_endAddress = (SBlock *)((char *)m_baseAddress + std::min(size * 0x100000, SYS_GetArena2Size() & ~31));
|
m_endAddress = (SBlock *)((char *)m_baseAddress + std::min(size * 0x100000, SYS_GetArena2Size() & ~31));
|
||||||
if (m_endAddress > (SBlock *)0x93300000)
|
if (m_endAddress > (SBlock *)0x93100000)
|
||||||
m_endAddress = (SBlock *)0x93300000;
|
m_endAddress = (SBlock *)0x93100000;
|
||||||
SYS_SetArena2Lo(m_endAddress);
|
SYS_SetArena2Lo(m_endAddress);
|
||||||
LWP_MutexInit(&m_mutex, 0);
|
LWP_MutexInit(&m_mutex, 0);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user