Re: [PATCH v2 3/8] objtool: allocate multiple structures with calloc()

From: Josh Poimboeuf
Date: Mon Jan 30 2023 - 18:54:10 EST


On Tue, Dec 27, 2022 at 04:00:59PM +0000, Thomas Weißschuh wrote:
> By using calloc() instead of malloc() in a loop, libc does not have to
> keep around bookkeeping information for each single structure.

If we cared about memory leaks, this wouldn't really work because some
structures are added in later, after the reading of the original
sections and symbols. Luckily we don't care :-)

--
Josh