Re: [PATCH 2/2] ruby: enable garbage collection using talloc

Subject: Re: [PATCH 2/2] ruby: enable garbage collection using talloc

Date: Thu, 10 Jun 2021 21:46:32 -0300

To: Felipe Contreras,

Cc: Tomi Ollila

From: David Bremner

Felipe Contreras <> writes:

> We basically steal all the objects from their notmuch parents, therefore
> they are completely under Ruby's gc control.
> The order at which these objects are freed does not matter any more,
> because destroying the database does not destroy all the children
> objects, since they belong to Ruby now.

I guess from a purist point of view this is a kind of layering
violation, since the use of talloc is purportedly an internal
implementation detail of the library. Still, I think it's a reasonable
approach given that the ruby bindings are maintained as part of notmuch,
and we are not very likely to abandon talloc.

I am OK with applying the series as is. The only sensible thing I can
think of at the moment for testing is to run something like the script
of as a "time
test", so not attempt to get valgrind working, but just run it on some
decent size corpuses and see that it it does not crash or leak too much
memory to complete.

notmuch mailing list --
To unsubscribe send an email to