This bug is seen during 2.5.0b1 testing.

Adding a directory with ~10000 files in amrecover,
amindexd tries to allocate over 2GB of memory.

$ find ~/.kde | wc -l
10264
$ amrecover
[snip]
>...