MCPcopy Create free account
hub / github.com/bytecodealliance/wasmtime / static_forced_max

Function static_forced_max

tests/all/memory.rs:441–452  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

439
440#[test]
441fn static_forced_max() -> Result<()> {
442 let mut config = Config::new();
443 config.memory_reservation(5 << 16);
444 config.memory_may_move(false);
445 let engine = Engine::new(&config)?;
446 let mut store = Store::new(&engine, ());
447
448 let mem = Memory::new(&mut store, MemoryType::new(0, None))?;
449 mem.grow(&mut store, 5).unwrap();
450 assert!(mem.grow(&mut store, 1).is_err());
451 Ok(())
452}
453
454#[wasmtime_test]
455fn dynamic_extra_growth_unchanged_pointer(config: &mut Config) -> Result<()> {

Callers

nothing calls this directly

Calls 6

OkFunction · 0.85
newFunction · 0.50
memory_reservationMethod · 0.45
memory_may_moveMethod · 0.45
unwrapMethod · 0.45
growMethod · 0.45

Tested by

no test coverage detected