[foreign] RFR Add sizeof method to Struct type

Henry Jen henry.jen at oracle.com
Thu Jul 26 14:56:38 UTC 2018


I am not sure why we need the Util.alignUp call here, that’s supposed to be used for allocation to arrange address space.

The layout should have proper padding and give the right size as if you call sizeof() in C on the struct.

Otherwise, SystemABI.sizeof(Layout) should give you the right size based on platform.

Cheers,
Henry


> On Jul 26, 2018, at 1:50 AM, Sundararajan Athijegannathan <sundararajan.athijegannathan at oracle.com> wrote:
> 
> Please review.
> 
> Bug: https://bugs.openjdk.java.net/browse/JDK-8208284
> Webrev: http://cr.openjdk.java.net/~sundar/8208284/webrev.00/
> 
> Thanks,
> -Sundar



More information about the panama-dev mailing list