Package com.dylibso.chicory.wasm.types
Class MemoryLimits
- java.lang.Object
-
- com.dylibso.chicory.wasm.types.MemoryLimits
-
public final class MemoryLimits extends Object
-
-
Field Summary
Fields Modifier and Type Field Description static intMAX_PAGESMaximum allowed number of pages.
-
Constructor Summary
Constructors Constructor Description MemoryLimits(int initial)Construct a new instance.MemoryLimits(int initial, int maximum)Construct a new instance.MemoryLimits(int initial, int maximum, boolean shared)Construct a new instance.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static MemoryLimitsdefaultLimits()booleanequals(MemoryLimits other)booleanequals(Object obj)inthashCode()intinitialPages()intmaximumPages()booleanshared()StringtoString()StringBuildertoString(StringBuilder b)
-
-
-
Field Detail
-
MAX_PAGES
public static final int MAX_PAGES
Maximum allowed number of pages.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
MemoryLimits
public MemoryLimits(int initial)
- Parameters:
initial- the initial size
-
MemoryLimits
public MemoryLimits(int initial, int maximum)Construct a new instance.sharedwill befalse.- Parameters:
initial- the initial sizemaximum- the maximum size, in pages
-
MemoryLimits
public MemoryLimits(int initial, int maximum, boolean shared)Construct a new instance.- Parameters:
initial- the initial size, in pagesmaximum- the maximum size, in pagesshared-trueif the limits apply to a shared memory segment, orfalseotherwise
-
-
Method Detail
-
defaultLimits
public static MemoryLimits defaultLimits()
- Returns:
- the default memory limits
-
initialPages
public int initialPages()
- Returns:
- the initial size, in pages
-
maximumPages
public int maximumPages()
- Returns:
- the maximum size, in pages
-
shared
public boolean shared()
- Returns:
trueif the limits apply to a shared memory segment, orfalseotherwise
-
equals
public boolean equals(MemoryLimits other)
-
toString
public StringBuilder toString(StringBuilder b)
-
-