#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 doughera):

 Replying to [comment:3 Paul C. Anagnostopoulos]:
 > Sorry, confusing terminology. The buffer "header" is the information
 stored in front of the actual buffer memory. The Buffer object is the
 buffer "descriptor."

 Ah, I see.  Thanks for the new description.  I had hoped that with the new
 memory organization, that hidden flag stuck before _bufstart could have
 been eliminated.  I have never been a fan of that trick, and prefer to
 tell the compiler explicitly what I'm doing so it automatically gets all
 the alignment correct.

 Does every Buffer have that Memory_Block element?  If so, would it make
 sense to just explicitly list it in the Buffer "descriptor?"

 >    Padding is only required if the
 >    alignment of the data portion is higher than that of a pointer.
 >    This was not the case as of 8/2010.

 It depends on how the memory blocks are obtained and carved up.  On 32-bit
 SPARC, doubles should be aligned at 8-byte boundaries, but pointers are
 only 4 bytes.  I'm not sure how parrot obtains and carves up space for
 those buffers.

-- 
Ticket URL: <https://trac.parrot.org/parrot/ticket/1731#comment:4>
Parrot <https://trac.parrot.org/parrot/>
Parrot Development
_______________________________________________
parrot-tickets mailing list
[email protected]
http://lists.parrot.org/mailman/listinfo/parrot-tickets

Reply via email to