Skip to content

Eigen 3.3 memory alignment and std::make_shared #957

@Lestropie

Description

@Lestropie

Just spent a good while trying to figure out why I couldn't get rid of the dreaded Eigen "Go read this web page!" memory alignment error.

Changing this:

files.push_back (std::make_shared<Class> (filename));

To this:

std::shared_ptr<Class> subject (new Class (filename));
files.emplace_back (subject);

fixed the issue.

std::make_shared must be requesting memory in some other way that's bypassing the over-ridden new operator. Could be an issue elsewhere. Either need to figure out what's going on and provide the necessary override as part of the MEMALIGN() macro, or remove all instances of std::make_shared (and look for it in check_memalign).

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions