Re: [eigen] portable reallocation...

[ Thread Index | Date Index | More lists.tuxfamily.org/eigen Archives ]


On Sun, Feb 28, 2010 at 1:53 PM, Benoit Jacob <jacob.benoit.1@xxxxxxxxx> wrote:
> Wait, one more comment.
>
> The function name ei_handmade_aligned_realloc is unfortunate, since it
> seems to suggests that it's the function for use with
> ei_handmade_aligned_malloc.
>
> So I would rather call it something like ei_generic_aligned_realloc.
>
> Then, it would be interesting to actually code the
> ei_handmade_aligned_realloc using std::realloc... indeed, in the
> handmade case, that would give better realloc performance.
>
> By the way, we also must call std::realloc and not realloc.
>
> Benoit
>
> 2010/2/28 Benoit Jacob <jacob.benoit.1@xxxxxxxxx>:
>> Great patch, just 1 comment:
>>
>> -    /*errno = ENOMEM;*/ // according to the standard we should set
>> errno = ENOMEM
>> +    errno = ENOMEM; // according to the standard
>>
>> Isn't it std::errno? Recently someone complained that the standard
>> doesn't guarantee that the c++ headers will define these symbols in
>> the global namespace, only in the std namespace. Putting std::
>> everywhere was necessary to fix QNX/QCC compatibillity.
>>
>> OH WAIT!
>>
>> While we're at it, all the calls to free() must be replaced by std::free() !!
>>
>> Finally, let me re-ask (since either you didn't reply to that or I
>> didn't understand the reply):
>>  - how about moving MSVC's functions _aligned_... up in the priority list?

I am not really sure about that. We might do that. First, I'll take
care of the other changes ...

- Hauke



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