Class SizeOf

java.lang.Object
org.graalvm.nativeimage.c.struct.SizeOf

public final class SizeOf extends Object
Contains static methods that provide access to the size of dereferenced SystemJava pointer types (i.e. the size of the data structure pointed-to by SystemJava pointer). Note that this semantic differs from the sizeof-operator defined by the C programming language.
Since:
19.0
  • Method Summary

    Modifier and Type
    Method
    Description
    static int
    get(Class<? extends org.graalvm.word.PointerBase> clazz)
    Returns the size of the data structure pointed to by SystemJava pointer types.
    static org.graalvm.word.UnsignedWord
    unsigned(Class<? extends org.graalvm.word.PointerBase> clazz)
    Returns the size cast to UnsignedWord.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • get

      public static int get(Class<? extends org.graalvm.word.PointerBase> clazz)
      Returns the size of the data structure pointed to by SystemJava pointer types. The class must be annotated with CStruct, CPointerTo, or RawStructure.
      Since:
      19.0
    • unsigned

      public static org.graalvm.word.UnsignedWord unsigned(Class<? extends org.graalvm.word.PointerBase> clazz)
      Returns the size cast to UnsignedWord.
      Since:
      19.0