Skip to content

Critical memory leak #156

@duburcqa

Description

@duburcqa

Hi,

There is a huge memory leak during the implicit conversion from numpy array to eigen matrix. Here is a script to reproduce the results on the attached figure.

import numpy as np
import pinocchio as pnc

pnc_model = pnc.buildModelFromUrdf('cartpole.txt')
pnc_data = pnc_model.createData()

q = np.zeros((2, 1))
v = np.zeros((2, 1))
for _ in range(10000000):
    pnc.forwardKinematics(pnc_model, pnc_data, q, v)
valgrind --tool=massif python test.py

Screenshot from 2020-02-19 16-17-18

cartpole.txt

I hope it is possible to fix it.

Best

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions