Rewriting bitmap_allocator

Dhruv Matani dhruvbird@gmail.com
Wed Jun 27 05:16:00 GMT 2012


On Tue, Jun 26, 2012 at 1:25 PM, Benjamin Kosnik <bkoz@redhat.com> wrote:

>
> Another thing you may think about is adding locality/"hotness" to
> profile mode or thinking of some way to measure this.

Sounds good. I'd like to have some pointers on what would be a good
diagnostic for profile mode. I mean on every [de]allocation (or maybe
every k'th [de]allocation), we could compute the number of reset bits
(objects allocated) and divide it by the area under the first to the
last reset bit (for every Tree), and that quotient would give a rough
idea of how fragment your active set is. The smaller this number, the
better it is.

>> Here is a link to the pdf (list didn't allow attachments):
>> http://dhruvbird.com/bitmap_allocator_proposal.pdf
>
> You may want to address C++11 allocator conformance/issues.

The only thing I could find here:
http://en.cppreference.com/w/cpp/memory/allocator was that the default
allocator needs to be stateless and that memory allocated with one
instance should be free-able by another. Do you have anything else in
mind?

Regards,
-Dhruv.



More information about the Libstdc++ mailing list