[AD] malloc() vs align_malloc()

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


before i go to the trouble of patching allegro i would like to hear of any arguments against using align_malloc() instead of malloc()

SSE/SSE2 instructions require aligned data for performance reasons.

i'd like to see at minimum all bitmap->dat* mallocs be aligned to 16 byte boundaries (SSE requirement).

on Windows, its called _aligned_malloc
details here: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vclib/html/vclrf_aligned_malloc.asp

a quick look through allegro, i found many instances were an aligned malloc *may* improve performace, many of these would not have any side effects as they are internally viewable vars, and would not break user viewable structs etc.

anyone from linux land able to offer the linux view or this proposal?

aj.





Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/