Skip to content

buffer.length

buffer dialect

Query the physical byte length of a buffer root without accessing its payload. Returns zero when the buffer is null.

Operation contract

Property Value
Semantic phase executable
Traits Pure, SafeToSpeculate

Signature

Kind Name Type Cardinality Description
Operand buffer buffer required Opaque storage root, which may be null.
Result byte_length offset required Physical byte length of the complete buffer root.

Examples

%byte_length = buffer.length %buffer