This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ 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] mt_allocator: spare mem & fix alignment problems


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


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