guile-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: GC + Java finalization


From: Maxime Devos
Subject: Re: GC + Java finalization
Date: Fri, 19 Nov 2021 13:48:35 +0000
User-agent: Evolution 3.38.3-1

Jonas Hahnfeld schreef op vr 19-11-2021 om 14:32 [+0100]:
> > > -  rx = scm_gc_malloc_pointerless (sizeof (regex_t), "regex");
> > > +  rx = scm_malloc (sizeof (regex_t));
> > 
> > If the regex why scm_gc_malloc_pointerless -> scm_malloc?
> > Is rx not pointerless?
> 
> Not sure I understand the question. We don't know what contents libc
> will write into regex_t. It could be pointers which would be bad for
> the garbage collector.

OK, if that's the case, seems like a bug in the original code, not
related to Java-style finalisation, so I would do that in a separate
patch.  Though libc probably allocates stuff with malloc and frees it
with free, and we call regfree to tell libc, so I think we should be
fine?

Greetings,
Maxime




reply via email to

[Prev in Thread] Current Thread [Next in Thread]