dictionary MemoryDescriptor {
    required [EnforceRange] unsigned long initial;
    [EnforceRange] unsigned long maximum;
    // https://webassembly.github.io/threads/js-api/index.html#dictdef-memorydescriptor
    boolean shared = false;
};

// https://webassembly.github.io/spec/js-api/#memories
[LegacyNamespace=WebAssembly, Exposed=*]
interface Memory {
    constructor(MemoryDescriptor descriptor);

    unsigned long grow([EnforceRange] unsigned long delta);

    ArrayBuffer toFixedLengthBuffer();
    ArrayBuffer toResizableBuffer();
    readonly attribute ArrayBuffer buffer;
};
