Jonas Hahnfeld schreef op vr 19-11-2021 om 14:32 [+0100]:
> > You coud simply ...
> > 
> > 
> > > -      scm_gc_free (rx, sizeof(regex_t), "regex");
> > > +      free (rx);
> > 
> > drop the scm_gc_free AFAIK.
> 
> No, I cannot as explained in the patch summary: If we use scm_gc_free
> in a free function of a Smob, this relies on Java finalization
> because
> the memory must not be reclaimed in the same cycle.

The suggestion was to remove scm_gc_free, and not introduce free.
I.e., don't free rx manually at all, let boehmgc decide:

 regex_free (SCM obj)
 {
   regfree (SCM_RGX (obj));
-  scm_gc_free (SCM_RGX (obj), sizeof(regex_t), "regex");
   return 0;
 }

Greetings,
Maxime
  • GC + Java finaliz... Developers list for Guile, the GNU extensibility library
    • Re: GC + Jav... Maxime Devos
    • Re: GC + Jav... Developers list for Guile, the GNU extensibility library
      • Re: GC +... Developers list for Guile, the GNU extensibility library
        • Re: ... Developers list for Guile, the GNU extensibility library
      • Re: GC +... Maxime Devos
        • Re: ... Developers list for Guile, the GNU extensibility library
          • ... Maxime Devos
            • ... Developers list for Guile, the GNU extensibility library
              • ... Maxime Devos
                • ... Developers list for Guile, the GNU extensibility library
                • ... Maxime Devos
                • ... Maxime Devos
          • ... Maxime Devos
            • ... Developers list for Guile, the GNU extensibility library
              • ... Maxime Devos
                • ... Developers list for Guile, the GNU extensibility library
                • ... Maxime Devos

Reply via email to