[Patch] mt_allocator: spare mem & fix alignment problems
Stefan Olsson
stefan@xapa.se
Fri Mar 26 09:35:00 GMT 2004
Paolo Carlini wrote:
> Hi,
>
> the below does two, in principle unrelated, things:
>
> 1- Changes struct block_record to a union: in fact next and
> thread_id are never used at the same time. The former only
> when the block is unused and linked to the others of the
> same thread, the latter only when used. This allows to spare
> a good amount of memory (see attachments)
But of course! Do I feel stupid or what?
>
>
> 2- Adds a configurable _M_min_bin, which sets the smallest bin
> size. The current 1 byte, frankly, doesn't make much sense
> and, anyway, raising it to 8 bytes allows to fix the alignment
> problems we were experiencing on ia64 (now the alignment is
> the same used by default by pool_allocator).
This has been on my todolist as well. Nice work Paolo!
/Stefan
More information about the Libstdc++
mailing list