Thread (62 messages) flat view 62 messages, 6 authors, 2021-08-03

Re: [PATCH 3/7] merge-ort: add pool_alloc, pool_calloc, and pool_strndup wrappers

From: Elijah Newren <hidden>
Date: 2021-07-28 22:49:36

On Mon, Jul 26, 2021 at 8:36 AM Derrick Stolee [off-list ref] wrote:
On 7/23/2021 8:54 AM, Elijah Newren via GitGitGadget wrote:
quoted
From: Elijah Newren <redacted>

We need functions which will either call
    xmalloc, xcalloc, xstrndup
or
    mem_pool_alloc, mem_pool_calloc, mem_pool_strndup
depending on whether we have a non-NULL memory pool.  Add these
functions; the next commit will make use of these.
I briefly considered that this should just be the way the
mem_pool_* methods work. It does rely on the caller knowing
to free() the allocated memory when their pool is NULL, so
perhaps such a universal change might be too much. What do
you think?
That's interesting, but I'm worried it might be a bit much.  Do others
on the list have an opinion here?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help