Thread (214 messages) 214 messages, 14 authors, 2021-05-18

Re: [PATCH v2 05/13] reftable: utility functions

From: Jonathan Nieder <hidden>
Date: 2020-10-12 15:25:09

(+cc: Patrick Steinhardt from libgit2)
Hi,

Han-Wen Nienhuys wrote[1]:
On Fri, Oct 2, 2020 at 6:12 AM Jonathan Nieder [off-list ref] wrote:
quoted
Han-Wen Nienhuys wrote:
quoted
quoted
+     reftable_free(a);
+}
Are there other callers that need custom free?
The libgit2 folks requested the ability to set memory allocation
routines, hence reftable_free().
Thanks.  Patrick or Han-Wen, can you say a little more about this use
case?  That would help with making sure we are making an API that
meets its needs.

For example, is a custom allocator something that would be set
globally or something attached to a handle?  If the former, would code
that uses xmalloc and free and gets #define-d away when used in
libgit2 work?  If the latter, what does the handle look like?

Thanks,
Jonathan

[1] context: https://lore.kernel.org/git/pull.847.git.git.1600283416.gitgitgadget@gmail.com/T/#r2337ddc80848c80f6c9699d904ab64d4297d2c54 (local)
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help