Skip to content

Fix #88#92

Merged
bchretien merged 2 commits into
roboptim:masterfrom
fdarricau:allocation_check
Apr 15, 2015
Merged

Fix #88#92
bchretien merged 2 commits into
roboptim:masterfrom
fdarricau:allocation_check

Conversation

@fdarricau
Copy link
Copy Markdown
Contributor

IMHO, the wrapping function set_is_malloc_allowed is probably not optimally placed in the code as it is not supposed to be part of the detail namespace. It is totally possible to move it to a whole new file, or even to core.hh/function.hh (even thought that does not really sounds good to me).

The other commits are basically about removing no more needed calls to set_is_malloc_allowed, thanks to the use of Eigen::Ref and making sure each call setting the varaible to true is followed by one setting it to false as soon as the allocation part is done.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this be set_is_malloc_allowed (false);?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed,

Apparently I failed the merge somewhere.

I correct this

@fdarricau
Copy link
Copy Markdown
Contributor Author

Done.

If everything looks good to you, the branch is ready to be rebased

@bchretien
Copy link
Copy Markdown
Member

I've been thinking about the organization of the code for this. This is not a detail that should be hidden in detail/utility.hh, nor is it purely related to debug so debug.hh is not a good candidate either. alloc.hh + alloc.cc is probably the best solution.

Comment thread src/util.cc Outdated
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if (update)

@fdarricau fdarricau force-pushed the allocation_check branch 2 times, most recently from 21bfa11 to 98808c6 Compare April 15, 2015 04:02
@bchretien
Copy link
Copy Markdown
Member

👍

bchretien added a commit that referenced this pull request Apr 15, 2015
@bchretien bchretien merged commit 11f5642 into roboptim:master Apr 15, 2015
@bchretien bchretien added this to the 3.1 release milestone Apr 15, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants