Re: [AD] SSE2 vs malloc()

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


On 2005-10-13, aj <aj@xxxxxxxxxx> wrote:
> Looking over the source code there is still alot of  malloc() calls.
> For SSE2 to work properly data must be aligned on 16 byte boundaries.
> 
> There also seems to be a function called  _al_malloc() which is a 
> wrapper for malloc().
> 
> Instead of regular malloc()  SSE2 uses _aligned_malloc() to ensure data 
> is on 16 byte boundaries.
>
> It would be much easier to simply have _aligned_malloc() replaced at one 
> single point (in the _al_malloc() )
> It can even be #defined in/out for which ever platform is required.
> 
> Is there any reason why all the regular malloc()'s  can not be changed 
> to _al_malloc() ?
> (please specificy both  technical reasons, and release schedule reasons)

This won't be in 4.2.0 (too big a change), but we could do it for 4.2.1
(doesn't break ABI compatibility).

> I can submit patches for them all, but its not worth doing until i know 
> its going to get implemented.

Make a patch and send it.  There was a plan to make the malloc/free
calls overridable anyway (it can be useful for language bindings).

Peter





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