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
$ amrecover
> add .kde

At this point, the churn starts going and the system
grinds to a halt. Amindexd was found having allocated
essentially all of the system memory.