http://qs321.pair.com?node_id=887239


in reply to Re^8: Module for 128-bit integer math?
in thread Module for 128-bit integer math?

So you say that newSV(16) always allocates the bytes on a 128-bit aligned

No, what I say is that the code generated by GCC uses 64bit operations to move data between the memory and the processor registers so a 128bits alignment is not really required.

Any sane allocator will return memory aligned for 64bits or better. Perl custom allocator (used when set from Configure) guarantees that alignment would be suitable for doubles (so, 64bits)... or at least that's what a comment says in the place where MEM_ALIGNBYTES macro is introduced.

update: Regarding the use of Copy, yes, it is because any string allocated outside the module can be unaligned. That includes SVs using the OOK hack and probably others.