This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: [Patch] mt_allocator: spare mem & fix alignment problems
- From: Stefan Olsson <stefan at xapa dot se>
- To: Paolo Carlini <pcarlini at suse dot de>
- Cc: libstdc++ <libstdc++ at gcc dot gnu dot org>, Benjamin Kosnik <bkoz at redhat dot com>
- Date: Fri, 26 Mar 2004 10:01:47 +0100
- Subject: Re: [Patch] mt_allocator: spare mem & fix alignment problems
- References: <40630DF2.7040507@suse.de>
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