On Wed, 11 May 2011 09:14:22 +0100, Richard Shann wrote
> On Tue, 2011-05-10 at 23:39 +0200, R. Mattes wrote:
> > > Even more surprising, I have looked into what is 
> > > happening with the scm_take_from_locale_string/n calls. In
> > principle 
> > > guile should be freeing the passed string when it is finished with 
> > > it. 
> > 
> > What makes ou belive this? The function signature in my header files
> > is:
> >  SCM_API SCM scm_from_locale_string (const char *str);
> > Why would you expext a 'const char*' block to be freed?
> 
> you are looking at the wrong function here - I refer to scm_take_... 

Ah, sorry, my fault.

> the "take" variant is supposed to free the string (it gives scheme 
> the opportunigy to re-use the string for its own storage of the 
> string).

But the info manual says that the given string is freed 'eventually' ...
The idea is (or was) that guile reuses the memory to hold the data for the 
scheme string. So the sting only gets freed once the scm value gets garbage
collected (note: in guile-2 the memory won't be resused and the string gets 
freed from within scm_take...

Hmm, in your case it might be that there's no garbage collection happening.
Does a "manual" (gc) change the memory footprint?

Cheers RalfD
 
> Richard


--
R. Mattes -
Hochschule fuer Musik Freiburg
[email protected]


_______________________________________________
Denemo-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/denemo-devel

Reply via email to