This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 2/5] Add single-threaded path to malloc/realloc/calloc/memalloc


DJ Delorie wrote:

> I also wonder if there's an upper limit to the main arena, where we'd
> have to use other arenas to fully use available VM.

I double checked the code - when we run out of memory using sbrk,
the main arena uses mmap to increase memory (other arenas use
heaps which work differently but still use mmap). If mmap fails as well
then it would previously try to create a new arena. However if mmap
fails then creating a new heap would fail too, so the single threaded
case can't behave differently even if it doesn't do a retry. Basically the
retry is only relevant in the multithreaded case where there could be
another arena with a lot of free space.

Are you OK with the rest of this patch?

Wilco

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]