Top Description Constructors Methods
org.graalvm.nativeimage.c.struct

public final Class SizeOf

extends Object
Class Inheritance
Imports
org.graalvm.nativeimage.ImageSingletons, org.graalvm.nativeimage.impl.SizeOfSupport, org.graalvm.word.PointerBase, .UnsignedWord, .WordFactory

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

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static int
get(Class<? extends PointerBase> clazz)

Returns the size of the data structure pointed to by SystemJava pointer types.

public static UnsignedWord
unsigned(Class<? extends PointerBase> clazz)

Returns the size cast to UnsignedWord.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

SizeOfback to summary
private SizeOf()

Method Detail

getback to summary
public static int get(Class<? extends 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
unsignedback to summary
public static UnsignedWord unsigned(Class<? extends PointerBase> clazz)

Returns the size cast to UnsignedWord.

Since
19.0