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: A quick word about the pthreadrope7 fails.


Dhruv Matani wrote:

[snip]

In the light of recent discussions and events, all of this is absolutely
obvious.

Cheap as it may seem, it works at the moment. Does this test fail with
any other allocator?

Of course doesn't, since we are not deleting any memory at destruction.

While we are at it, I also have something obvious to say ;)

---------------------------------------------------------------------
|   136   |    0    | 4294967295 |      Data-> Space for 32-ints    |
---------------------------------------------------------------------

since in the example the Data is 3 x 4 = 12 bytes forward wrt the address
returned by ::operator new, of course it can only by aligned 4, bummer!

If the header (the first 3 items) were longs on 64-bit machines you would
have the Data aligned 8. And if you want the Data aligned 16, just add a
long of padding between the bitmaps and the data.

Paolo.


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