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] bitmap_allocator.


Dhruv Matani wrote:

"- Still *lots* of warning about insufficient alignment on ia64: it seems you are
still using casts to <unsigned int> and this is definitely not ok:


Ok, I have added a macro _BALLOC_ALIGN_BYTES by which you can set the
alignment in bytes at compile time itself. However, I don't think that I
can do away entirely with those reinterpret_casts to unsigned int. What
I have done is that whenever I do perform those casts, I make sure that
the memory is aligned to _BALLOC_ALIGN_BYTES.


I'm not sure to understand what you are trying to accomplish, but definitely
doesn't work and now the code is littered with series of *three* consecutive
reinterpret_cast!

Please send me a patch only removing those macros trigerring warnings at
compile time and rethink the whole alignment issue at your ease: I suggest just
studying pool_alloc and mt_alloc about that, if you are careful everything is
rather simple and you don't need loads of casts.


Anyway, let's assume that we are not going to fix that issue in this commit,
we have already a big improvement wrt the existing situation and suffices
for now.

Paolo.


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