This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [COMMITTED] malloc: Consistently apply trim_threshold to all heaps.
- From: "Carlos O'Donell" <carlos at redhat dot com>
- To: Andreas Schwab <schwab at suse dot de>
- Cc: GNU C Library <libc-alpha at sourceware dot org>
- Date: Wed, 28 Oct 2015 02:00:03 -0400
- Subject: Re: [COMMITTED] malloc: Consistently apply trim_threshold to all heaps.
- Authentication-results: sourceware.org; auth=none
- References: <5615D398 dot 7080801 at redhat dot com> <mvma8rt3i3w dot fsf at hawking dot suse dot de>
On 10/08/2015 04:00 AM, Andreas Schwab wrote:
> "Carlos O'Donell" <carlos@redhat.com> writes:
>
>> diff --git a/malloc/arena.c b/malloc/arena.c
>> index b44e307..cb45a04 100644
>> --- a/malloc/arena.c
>> +++ b/malloc/arena.c
>> @@ -696,14 +696,20 @@ heap_trim (heap_info *heap, size_t pad)
>> }
>>
>> /* Uses similar logic for per-thread arenas as the main arena with systrim
>> - by preserving the top pad and at least a page. */
>> + and _int_free by preserving the top pad and rounding down to the nearest
>> + page. */
>> top_size = chunksize (top_chunk);
>> + if ((unsigned long)(top_size) <
>> + (unsigned long)(mp_.trim_threshold))
>
> Line break before the operator, not after. Also, the parens are useless
> and confusing.
I'll fix that shortly. Thanks. Sorry for being sloppy.
c.