Re: [eigen] Clean aligned memory allocation

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


Indeed, I'm anxiously hoping that it will make it through!

2016-02-02 9:06 GMT-05:00 Gael Guennebaud <gael.guennebaud@xxxxxxxxx>:

Since we are at it, this proposal should address all our issues with operator new: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/p0035r0.html

gael

On Tue, Feb 2, 2016 at 2:47 PM, Benoit Jacob <jacob.benoit.1@xxxxxxxxx> wrote:


2016-02-02 7:29 GMT-05:00 Gael Guennebaud <gael.guennebaud@xxxxxxxxx>:

On Tue, Feb 2, 2016 at 1:59 AM, Benoit Jacob <jacob.benoit.1@xxxxxxxxx> wrote:
it relies on the unsafe assumption that the memory allocator is a property of the platform and can thus be inferred from preprocessor checks.
That's not the case: many large applications use their own memory allocator, and that's a runtime property, not something that Eigen could detect at compile time.

Actually, in C++11, std::malloc is required to return pointers matching the alignment given by alignof(max_align_t)), which is 16 on most 64bits systems. This is a reliable information, and any malloc replacement would thus be required to honor this requirement.

Interesting, great to know that the problem is going away in C++11 or at least is being folded into something that we can rely on at compile time.
Not sure though what that means for us as long as we're not requiring compiling in C++11 mode.

Benoit
 

gael





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