multithreading - Strange memory leak in C++ with Eigen and boost::thread -


I have two threads in the program. They are created by using: Promotion: Thread.

Two threads do not share anything in memory. No data structures or objects are shared between them.

Now the second thread uses a class, in which private members are many Egene double matrix. I'm sure the Matrix Eigen is aligning using EIGEN_MAKE_ALIGNED_OPERATOR_NEW, etc.

When the first thread is running the element in the second class matrix then the over is written. I checked that after inspection after the elements Should be a decimal from a sudden integer when the first thread is not running second, then there is no problem and its EEZEN members have the right values.

Again: 1) Two threads do not share any data structure. 2) There is no rebuttal error message or some similar or some error message when programming is running. 3) Any suggestion how to protect the memory of another thread or how to violate memory?

Thank you in advance I am sorry that I did not post the code, but it is too big. I know that you want me to post something specific to the code.

You probably want a debugging device like Mac or Electric Fence for Linux, like Melloggard

By adding "guard page" before allocation, these tasks mark them as inaccessible virtual memory When memory is released, it is also marked as inaccessible areas. If the program tries to reach the memory that it should not be done, then the revised oscillator ensures that it crashes instantly, so that your debugger will hopefully expose the line of code that was causing corruption. Be careful that it can consume large amounts of memory, so you will likely need a small data set which reproduces corruption.

Comments

Popular posts from this blog

Python SQLAlchemy:AttributeError: Neither 'Column' object nor 'Comparator' object has an attribute 'schema' -

java - How not to audit a join table and related entities using Hibernate Envers? -

mongodb - CakePHP paginator ignoring order, but only for certain values -