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] malloc: Prevent arena free_list from turning cyclic [BZ #19048]


On 10/09/2015 11:29 PM, Paulo CÃsar Pereira de Andrade wrote:

> more threads then arenas, will cause it to cycle in the next pointer,
> until there are less threads than arenas, in which case,  the
> next_free pointer would become close to useless, as well as the
> reference counter, because they would seldomly be used.

I believe this was the original intent, though.  free_list is supposed
to be a source of likely uncontended arenas, which is why arenas are
taken from free_list first.

The free_list fallback will be used if threads exit and are started
again, so it depends on the application how often this happens and if
this arena selection logic is beneficial.

Florian


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