Memory alignment fix

Some mutexes added, _sys_heap_memalign implemented
This commit is contained in:
Nekotekina 2014-02-02 23:49:10 +04:00
parent 15dd0bb0f2
commit 7fce5589f8
16 changed files with 236 additions and 116 deletions

View file

@ -240,7 +240,7 @@ bool ELF64Loader::LoadPhdrData(u64 offset)
case 0x00000001: //LOAD
if(phdr_arr[i].p_memsz)
{
Memory.MainMem.Alloc(offset + phdr_arr[i].p_vaddr, phdr_arr[i].p_memsz);
Memory.MainMem.AllocFixed(offset + phdr_arr[i].p_vaddr, phdr_arr[i].p_memsz);
if(phdr_arr[i].p_filesz)
{
@ -358,8 +358,8 @@ bool ELF64Loader::LoadPhdrData(u64 offset)
ConLog.Write("*** text: 0x%x", stub.s_text);
#endif
static const u32 section = 4 * 3;
u64 tbl = Memory.MainMem.Alloc(stub.s_imports * 4 * 2);
u64 dst = Memory.MainMem.Alloc(stub.s_imports * section);
u64 tbl = Memory.MainMem.AllocAlign(stub.s_imports * 4 * 2);
u64 dst = Memory.MainMem.AllocAlign(stub.s_imports * section);
for(u32 i=0; i<stub.s_imports; ++i)
{