Class: Wasmtime::PoolingAllocationConfig
- Inherits:
-
Object
- Object
- Wasmtime::PoolingAllocationConfig
- Defined in:
- ext/src/ruby_api/pooling_allocation_config.rs
Overview
Configuration options used with an engines ‘allocation_strategy` to change the behavior of the pooling instance allocator.
Class Method Summary collapse
Instance Method Summary collapse
- #async_stack_keep_resident=(amount) ⇒ Wasmtime::PoolingAllocationConfig
- #max_memories_per_module=(max_memories) ⇒ Wasmtime::PoolingAllocationConfig
- #max_tables_per_module=(max_tables) ⇒ Wasmtime::PoolingAllocationConfig
- #total_memories=(total_memories) ⇒ Wasmtime::PoolingAllocationConfig
- #total_tables=(total_tables) ⇒ Wasmtime::PoolingAllocationConfig
Class Method Details
.memory_protection_keys_available? ⇒ Boolean
87 88 89 |
# File 'ext/src/ruby_api/pooling_allocation_config.rs', line 87
pub fn are_memory_protection_keys_available() -> Result<bool, Error> {
Ok(wasmtime::PoolingAllocationConfig::are_memory_protection_keys_available())
}
|
.new ⇒ Wasmtime::PoolingAllocationConfig
31 32 33 34 35 36 37 38 39 |
# File 'ext/src/ruby_api/pooling_allocation_config.rs', line 31
pub fn new() -> Result<Obj<Self>, Error> {
let obj = Obj::wrap(Self::from(PoolingAllocationConfigImpl::default()));
if block_given() {
let _: Value = block_proc()?.call((obj,))?;
}
Ok(obj)
}
|
Instance Method Details
#async_stack_keep_resident=(amount) ⇒ Wasmtime::PoolingAllocationConfig
95 96 97 98 99 100 101 |
# File 'ext/src/ruby_api/pooling_allocation_config.rs', line 95
pub fn set_async_stack_keep_resident(
rb_self: Obj<Self>,
amt: usize,
) -> Result<Obj<Self>, Error> {
rb_self.borrow_mut()?.async_stack_keep_resident(amt);
Ok(rb_self)
}
|
#max_memories_per_module=(max_memories) ⇒ Wasmtime::PoolingAllocationConfig
64 65 66 67 68 69 70 |
# File 'ext/src/ruby_api/pooling_allocation_config.rs', line 64
pub fn set_max_memories_per_module(
rb_self: Obj<Self>,
max_memories: u32,
) -> Result<Obj<Self>, Error> {
rb_self.borrow_mut()?.max_memories_per_module(max_memories);
Ok(rb_self)
}
|
#max_tables_per_module=(max_tables) ⇒ Wasmtime::PoolingAllocationConfig
76 77 78 79 80 81 82 |
# File 'ext/src/ruby_api/pooling_allocation_config.rs', line 76
pub fn set_max_tables_per_component(
rb_self: Obj<Self>,
max_tables: u32,
) -> Result<Obj<Self>, Error> {
rb_self.borrow_mut()?.max_tables_per_component(max_tables);
Ok(rb_self)
}
|
#total_memories=(total_memories) ⇒ Wasmtime::PoolingAllocationConfig
45 46 47 48 49 |
# File 'ext/src/ruby_api/pooling_allocation_config.rs', line 45
pub fn set_total_memories(rb_self: Obj<Self>, total_memories: u32) -> Result<Obj<Self>, Error> {
rb_self.borrow_mut()?.total_memories(total_memories);
Ok(rb_self)
}
|
#total_tables=(total_tables) ⇒ Wasmtime::PoolingAllocationConfig
55 56 57 58 |
# File 'ext/src/ruby_api/pooling_allocation_config.rs', line 55
pub fn set_total_tables(rb_self: Obj<Self>, total_tables: u32) -> Result<Obj<Self>, Error> {
rb_self.borrow_mut()?.total_tables(total_tables);
Ok(rb_self)
}
|