#1731: Assumption made about buffer header alignment
-------------------------------------+--------------------------------------
Reporter: Paul C. Anagnostopoulos | Owner: Paul C. Anagnostopoulos
Type: bug | Status: assigned
Priority: normal | Milestone:
Component: core | Version: 2.6.0
Severity: low | Keywords:
Lang: | Patch:
Platform: |
-------------------------------------+--------------------------------------
Comment(by Paul C. Anagnostopoulos):
Now that I think about my terminology, it runs contrary to the terminology
used elsewhere. I'll fix that in the comments.
I believe that every memory buffer has the Memory_Block in its header,
although I'm not positive. In order to move it to the Buffer object, we
would have to do a careful analysis to see if any functions grab the
Memory_Block directly from a memory buffer rather than via its Buffer
object.
Buffers are currently aligned using `WORD_ALIGN_1`, which is based on the
size of a pointer. That's why this problem won't arise now. But there is
`BUFFER_ALIGN_1` lurking around and it would align on 8-byte boundaries if
it were used. This is odd, since a comment claims that buffers are aligned
for `FLOATVAL`s. Either the comment is wrong or I don't understand what is
going on.
--
Ticket URL: <https://trac.parrot.org/parrot/ticket/1731#comment:5>
Parrot <https://trac.parrot.org/parrot/>
Parrot Development
_______________________________________________
parrot-tickets mailing list
[email protected]
http://lists.parrot.org/mailman/listinfo/parrot-tickets