[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Adds dimension stencil command to correct with-dimension (issue 1295
From: |
k-ohara5a5a |
Subject: |
Re: Adds dimension stencil command to correct with-dimension (issue 12957047) |
Date: |
Wed, 04 Sep 2013 18:36:17 +0000 |
https://codereview.appspot.com/12957047/diff/88001/lily/stencil-integral.cc
File lily/stencil-integral.cc (right):
https://codereview.appspot.com/12957047/diff/88001/lily/stencil-integral.cc#newcode917
lily/stencil-integral.cc:917: }
My best guess for the cause of the extra memory, showing in the `make
check` profile output, is this loop written as tail recursion:
stencil_traverser (PangoMatrix trans, SCM expr) {
[...]
else if (scm_car (expr) == ly_symbol2scm ("skyline-stencil")) {
SCM skyline_stencil = scm_cadr (expr);
return stencil_traverser (trans, skyline_stencil);
}
Maybe having 'skyline_stencil' as an automatic variable and also a
function parameter, which would be optimized to a different automatic
variable 'expr' in the same function, confuses the reference counting in
Guile's garbage-collection.
The current patches for our tracked issues 3255 and 3522 avoid creating
SCM data types in the C code, and did not show extra memory in the
profile output, so seem be safe enough.
https://codereview.appspot.com/12957047/
- Re: Adds dimension stencil command to correct with-dimension (issue 12957047),
k-ohara5a5a <=