This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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: [bitmap memory]: Allocation part 2


Jeffrey A Law wrote:


4) There is a tendency for newer code to never use stack-frame allocated
bitmaps, instead always using a dynamically allocated one.  Should
we remove the stack-frame allocation mechanism?  I'd guess the runtime
saving of using it to be negligible.

I wasn't even aware of them :-) There are places where having them on the stack makes sense from a maintenance point of view. However, I tend to dislike allocating potentially large objects on the stack. So my vote would be to kill them.

I was unclear. What is allocated on the stack is the bitmap_head (a 4 slot struct), the elements themselves will go on an obstack. The function ends up passing an address of a stack slot, rather than a pointer obtained from BITMAP_ALLOC(). IMHO, this interface is additional maintainance burden for no gain.

That patch is, err, long.  Is there any way you can break it into
distinct functional hunks to make review easier?
I shall think about how best to do this.

nathan

--
Nathan Sidwell    ::   http://www.codesourcery.com   ::     CodeSourcery LLC
nathan@codesourcery.com    ::     http://www.planetfall.pwp.blueyonder.co.uk


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