Questions
DenisYaroshevskiy opened this issue · 2 comments
DenisYaroshevskiy commented
Hi
This align confused me:
I thought that when you do placement new, you should automatically get the aligned address.
And also that aligned_storage should have sufficient size to store anything of that size or less.
Is this to support custom aligned types and arbitrary buffer sizes?
What are you trying to achieve?
Why do you use RTTI instead of strategy pattern?
liberasure/include/erasure/erasure.hpp
Line 266 in a0ff84d
atomgalaxy commented
That could well be - and in that case I don't need that function.
G
…On Thu, Jul 18, 2019, 03:13 Denis Yaroshevskiy ***@***.***> wrote:
Hi
This align confused me:
https://github.com/atomgalaxy/liberasure/blob/a0ff84d2e890de61c7e78feabb0d2e09552625b3/include/erasure/small_buffer.hpp#L50
I thought that when you do placement new, you should automatically get the
aligned address.
And also that aligned_storage should have sufficient size to store
anything of that size or less.
Is this to support custom aligned types and arbitrary buffer sizes?
What are you trying to achieve?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#2?email_source=notifications&email_token=AAA5R5KHQ23GL6NLOKNDBXLP77GURA5CNFSM4IEWJUIKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4G74SQ6Q>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAA5R5M2ZC67DZUIB53AB4LP77GURANCNFSM4IEWJUIA>
.
DenisYaroshevskiy commented
Remembered about this old post by Sean Parent on the subject: http://stlab.cc/tips/small-object-optimizations.html
It's a tricky exercise in general.