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.
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.
|