C
Chris Thomasson
Here is some info on a C++ allocator prototype I am working on:
http://groups.google.com/group/comp.lang.c++/browse_frm/thread/beeee1f61fdbb52c
Any tried-and-true techniques for calculating the correct alignment of any
C++ type the user can throw at it? For the initial code, I was assuming that
the alignment(T) == sizeof(T)... Now that I am so close to being able to
release this thing, I wanted to be able to stitch up this loose end.
All of the allocators I have worked on were always uses by entities which
were private to a library implementation... Any they only needed to align
structures on level-2 cache-line boundaries. So, I didn't need to align for
the type, I only align for the cache line.
Now I need to figure out how to get the correct alignment of any C++ type a
user can come up with...
Help!
:^)
http://groups.google.com/group/comp.lang.c++/browse_frm/thread/beeee1f61fdbb52c
Any tried-and-true techniques for calculating the correct alignment of any
C++ type the user can throw at it? For the initial code, I was assuming that
the alignment(T) == sizeof(T)... Now that I am so close to being able to
release this thing, I wanted to be able to stitch up this loose end.
All of the allocators I have worked on were always uses by entities which
were private to a library implementation... Any they only needed to align
structures on level-2 cache-line boundaries. So, I didn't need to align for
the type, I only align for the cache line.
Now I need to figure out how to get the correct alignment of any C++ type a
user can come up with...
Help!
:^)