This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH]: Efficient sbitmap based bitset
On Mon, Aug 20, 2001 at 10:56:32AM -0400, Daniel Berlin wrote:
> Just so people don't think it's only a bitmap replacement.
I understood that.
> Do we know the average lifetime of regsets?
I wonder how much trouble you'd have garbage collecting them. There
aren't many that are live across passes, so there shouldn't be many
that need marking. In fact, the only long lived regsets I can think
of are global_live_at_{start,end}.
It'd still be a good idea to provide a method to free them early, since
we can save some amount of wastage that way. A free list that gets
zapped on collect (a-la unused_insn_list in lists.c) would seem ideal.
> > I also wonder if better memory density could be had by doing
> > some by-hand memory allocation. That is, N 64 byte blocks of
> > memory can be allocated out of raw pages without overhead,
> > whereas you'll waste at least 2 pointer's worth with malloc.
> Hmmmm.
Incidentally, allocating via ggc_alloc largely takes care of this.
On a 64-bit system, with 64-byte hunks, we have 7 words overhead
per 128 hunks.
r~