Welcome! Log In Create A New Profile

Advanced

is memealign required?

Posted by arasium 
is memealign required?
July 28, 2009 10:03AM
Helle,

when i read source code of different applications (like fs toolbox or others like that), i see that when we pass an objet to an ISFS function, we always initiate the memory with a memalign(32, xxx).

Is it really required (i think of ISFS_GetFileStats, ISFS_Read ...) ?
Re: is memealign required?
July 28, 2009 05:28PM
Probably - the Wii requires certain memory be 32 byte aligned. If it's not...it can lead to unpredictable results.
Re: is memealign required?
July 28, 2009 08:18PM
Does the PowerPC CPU require memory to be aligned?



Edited 1 time(s). Last edit at 07/28/2009 08:19PM by daniel_c_w.
Re: is memealign required?
July 29, 2009 11:35AM
I've some response :)

Generally, yes we need to be 32 bit aligned (for exemple, Get_FileStats make a DSI Exception). I've made some tests and i often have e DSI Exception when the buffer isn't 32 bit aligned.
Re: is memealign required?
July 29, 2009 10:39PM
Except, that's not the alignment exception.
Re: is memealign required?
July 30, 2009 10:45AM
Yes :) But this exception occures because we don't align buffer (i think, the underlying function write elements over the end of buffer, wich create after the DSI Exception)
Sorry, only registered users may post in this forum.

Click here to login