-
Notifications
You must be signed in to change notification settings - Fork 197
Eigen 3.3 memory alignment and std::make_shared #957
Copy link
Copy link
Closed
Description
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).
Reactions are currently unavailable