On Mon, Oct 26, 2015 at 2:18 AM, Mikhail Maltsev <malts...@gmail.com> wrote:
> On 10/21/2015 01:57 PM, Richard Biener wrote:
>> Ugh (stupid templates).
>>
>> @@ -387,10 +389,10 @@ base_pool_allocator <TBlockAllocator>::allocate ()
>>        block = m_virgin_free_list;
>>        header = (allocation_pool_list*) allocation_object::get_data (block);
>>        header->next = NULL;
>> -#ifdef ENABLE_CHECKING
>> +
>>        /* Mark the element to be free.  */
>> -      ((allocation_object*) block)->id = 0;
>> -#endif
>> +      if (flag_checking)
>> +       ((allocation_object*) block)->id = 0;
>>
>> just set id to zero unconditionally.  That'll be faster than checking
>> flag_checking.
>
> I fixed this and other issues, and committed the attached patch.

I committed the attached to fix build with the valgrind annotations active.

Richard.

2015-10-26  Richard Biener  <rguent...@suse.de>

        * alloc-pool.h (base_pool_allocator): Use placement new.
        (base_pool_allocator::remove): Likewise.  Compute size outside of
        flag_checking.


> --
> Regards,
>     Mikhail Maltsev

Attachment: p
Description: Binary data

Reply via email to