Package: unace-nonfree
Version: 2.5-7
BASE_MEMORY_InitMaxAllocate in source/base/all/memory/lin.c has this
loop:
while (Size < BASE_MEMORY_EXTERN_MaxMemoryRequirement()
&& (NewBuf = (char*) realloc(Buf, Size * 2)))
{
counter++;
Buf = NewBuf;
memset(&Buf[Size], 0, Size);
getrusage(RUSAGE_SELF, &ru);
if (!StartMajorFaults)
{
StartMajorFaults = ru.ru_majflt;
}
if (ru.ru_nswap || ru.ru_majflt != StartMajorFaults)
{
free(Buf);
Buf = NULL;
break;
}
Size *= 2;
}
On any modern system this loop will go through 128 iterations. On my
test machine it takes ~0.1s to execute all of them, which is quite a
bit.
Please consider making this faster.
BASE_MEMORY_EXTERN_MaxMemoryRequirement() returns 16MB, which is not
much these days, so perhaps you could just set:
BASE_MEMORY.MaxAllocate = BASE_MEMORY_EXTERN_MaxMemoryRequirement();
--
Jakub Wilk
--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org