<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/commit-slab-impl.h, branch gitk-resize-error</title>
<subtitle>Fork of git SCM with my patches.</subtitle>
<id>http://git.kilabit.info/git/atom?h=gitk-resize-error</id>
<link rel='self' href='http://git.kilabit.info/git/atom?h=gitk-resize-error'/>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/'/>
<updated>2020-06-08T19:28:49Z</updated>
<entry>
<title>commit-slab: add a function to deep free entries on the slab</title>
<updated>2020-06-08T19:28:49Z</updated>
<author>
<name>SZEDER Gábor</name>
<email>szeder.dev@gmail.com</email>
</author>
<published>2020-06-05T13:00:26Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=1df15f8dee5c637c9013d11d5b8e72e189a04f06'/>
<id>urn:sha1:1df15f8dee5c637c9013d11d5b8e72e189a04f06</id>
<content type='text'>
clear_##slabname() frees only the memory allocated for a commit slab
itself, but entries in the commit slab might own additional memory
outside the slab that should be freed as well.  We already have (at
least) one such commit slab, and this patch series is about to add one
more.

To free all additional memory owned by entries on the commit slab the
user of such a slab could iterate over all commits it knows about,
peek whether there is a valid entry associated with each commit, and
free the additional memory, if any.  Or it could rely on intimate
knowledge about the internals of the commit slab implementation, and
could itself iterate directly through all entries in the slab, and
free the additional memory.  Or it could just leak the additional
memory...

Introduce deep_clear_##slabname() to allow releasing memory owned by
commit slab entries by invoking the 'void free_fn(elemtype *ptr)'
function specified as parameter for each entry in the slab.

Use it in get_shallow_commits() in 'shallow.c' to replace an
open-coded iteration over a commit slab's entries.

Signed-off-by: SZEDER Gábor &lt;szeder.dev@gmail.com&gt;
Signed-off-by: Derrick Stolee &lt;dstolee@microsoft.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>commit-slabs: move MAYBE_UNUSED out</title>
<updated>2018-10-24T05:52:50Z</updated>
<author>
<name>Carlo Marcelo Arenas Belón</name>
<email>carenas@gmail.com</email>
</author>
<published>2018-10-23T21:50:19Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=bbd8eb3ecbc5ea9822c88e50af653999e16bd2ee'/>
<id>urn:sha1:bbd8eb3ecbc5ea9822c88e50af653999e16bd2ee</id>
<content type='text'>
after 36da893114 ("config.mak.dev: enable -Wunused-function", 2018-10-18)
it is expected to be used to prevent -Wunused-function warnings for code
that was macro generated

Signed-off-by: Carlo Marcelo Arenas Belón &lt;carenas@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>commit-slabs: remove realloc counter outside of slab struct</title>
<updated>2018-06-29T17:43:40Z</updated>
<author>
<name>Stefan Beller</name>
<email>sbeller@google.com</email>
</author>
<published>2018-06-29T01:22:14Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=95bb9d4c326695553b9d5499752e24959e833f82'/>
<id>urn:sha1:95bb9d4c326695553b9d5499752e24959e833f82</id>
<content type='text'>
The realloc counter is declared outside the struct for the given slabname,
which makes it harder for a follow up patch to move the declaration of the
struct around as then the counter variable would need special treatment.

As the reallocation counter is currently unused we can just remove it.
If we ever need to count the reallocations again, we can reintroduce
the counter as part of 'struct slabname' in commit-slab-decl.h.

Signed-off-by: Stefan Beller &lt;sbeller@google.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>commit-slab: support shared commit-slab</title>
<updated>2018-05-21T05:07:19Z</updated>
<author>
<name>Nguyễn Thái Ngọc Duy</name>
<email>pclouds@gmail.com</email>
</author>
<published>2018-05-19T05:28:18Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=878f0bb81990170cde5dba934fcd1ae4c2e698ee'/>
<id>urn:sha1:878f0bb81990170cde5dba934fcd1ae4c2e698ee</id>
<content type='text'>
define_shared_commit_slab() could be used in a header file to define a
commit-slab. One of these C files must include commit-slab-impl.h and
"call" implement_shared_commit_slab().

Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>commit-slab.h: code split</title>
<updated>2018-05-21T05:07:19Z</updated>
<author>
<name>Nguyễn Thái Ngọc Duy</name>
<email>pclouds@gmail.com</email>
</author>
<published>2018-05-19T05:28:17Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=a9f1f1f9f8b2873c43d6100717eb776ea288ed9e'/>
<id>urn:sha1:a9f1f1f9f8b2873c43d6100717eb776ea288ed9e</id>
<content type='text'>
The struct declaration and implementation macros are moved to
commit-slab-hdr.h and commit-slab-impl.h respectively.

This right now is not needed for current users but if we make a public
commit-slab type, we may want to avoid including the slab
implementation in a header file which gets replicated in every c file
that includes it.

Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
