bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Curious... on readline history patch -- round up memory allocs?


From: L. A. Walsh
Subject: Re: Curious... on readline history patch -- round up memory allocs?
Date: Tue, 15 Nov 2016 16:33:53 -0800
User-agent: Thunderbird



Eduardo Bustamante wrote:
I think this is unnecessary, malloc (either the bash malloc in
lib/malloc/malloc.c or the libc provided malloc) should already take
care of requesting memory in page sized chunks.

At least that's what I see here (morecore function):
http://git.savannah.gnu.org/cgit/bash.git/tree/lib/malloc/malloc.c?h=devel&id=216e2e9b8ba21fff677cf7794ef3d9af8c91d46d#n622

Unless I'm missing something, there's nothing to gain from optimizing
on top of xmalloc/malloc.
---
That's fine -- I was just reading the comment about how 4.4 changed
history allocs to optimize memory reallocs and movement.  So if things
were fine with malloc before, I'm not sure why they were optimized
within bash in 4.4...?





reply via email to

[Prev in Thread] Current Thread [Next in Thread]