Module java.base

Interface AddressLayout

All Superinterfaces:
MemoryLayout, ValueLayout

public sealed interface AddressLayout extends ValueLayout
A value layout used to model the address of some region of memory. The carrier associated with an address layout is MemorySegment.class. The size and alignment of an address layout are platform-dependent (e.g. on a 64-bit platform, the size and alignment of an address layout are set to 8 bytes).

An address layout may optionally feature a target layout. An address layout with target layout T can be used to model the address of a region of memory whose layout is T. For instance, an address layout with target layout ValueLayout.JAVA_INT can be used to model the address of a region of memory that is 4 bytes long. Specifying a target layout can be useful in the following situations:

Implementation Requirements:
Implementations of this interface are immutable, thread-safe and value-based.
Since:
22
See Also: