Re: [eigen] Clean aligned memory allocation

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



On Tue, Feb 2, 2016 at 1:59 AM, Benoit Jacob <jacob.benoit.1@xxxxxxxxxx> 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.

gael


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