Re: [Mutt] #3017: change-folder: tab-completion results in "Out of
#3017: change-folder: tab-completion results in "Out of memory!", return value
= 1
if many files for the menu
Comment (by Rocco Rutte):
{{{
Hi,
* Mutt wrote:
> Perhaps you can waste some memory with a geometric progression compared
to
> an arithmetic progression (but this is not obvious, as the fragmentation
> may be lower), but the time complexity should be better. I'd say O(n)
> instead of O(n^2^). See [http://en.wikipedia.org/wiki/Dynamic_array].
But
> all this depends on the malloc routine and how blocks are allocated.
Even 2000 files in a directory you browse with mutt are quite a lot, and
that would be 1 calloc() and 7 realloc() calls. I think there're areas
in mutt where memory management needs to be improved first than this
one... what gains do you expect from such an optimization?
Rocco
}}}
--
Ticket URL: <http://dev.mutt.org/trac/ticket/3017#comment:>