<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="/rss.xsl.xml"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
    <title>Changes in memory.rs</title>
    <description></description>
    <language>en</language>
    <copyright>Copyright 2015</copyright>
    <generator>Java</generator><item>
        <title>7948e0ff - Expose custom page sizes in the C and C++ APIs (#11890)</title>
        <link>http://172.16.0.5:8080/history/wasmtime-44.0.1/crates/c-api/src/memory.rs#7948e0ff</link>
        <description>Expose custom page sizes in the C and C++ APIs (#11890)* Expose custom page sizes in the C and C++ APIs* Also expose `Config` knob for custom-page-sizes to C and C++ APIs* Avoid null-check in `MemoryType`&apos;s deleter* Check `clangformat.sh` in CI

            List of files:
            /wasmtime-44.0.1/crates/c-api/src/memory.rs</description>
        <pubDate>Mon, 20 Oct 2025 21:27:53 +0000</pubDate>
        <dc:creator>Nick Fitzgerald &lt;fitzgen@gmail.com&gt;</dc:creator>
    </item>
<item>
        <title>90ac295e - Update Wasmtime to the 2024 Rust Edition (#10806)</title>
        <link>http://172.16.0.5:8080/history/wasmtime-44.0.1/crates/c-api/src/memory.rs#90ac295e</link>
        <description>Update Wasmtime to the 2024 Rust Edition (#10806)* Update Wasmtime to the 2024 Rust EditionNow that our MSRV supports the 2024 edition it&apos;s possible to make thisswitch. This commit moves Wasmtime to the 2024 Edition to keepup-to-date with Rust idioms and access many of the edition featuresexclusive to the 2024 edition.prtest:full* Reformat with the 2024 edition

            List of files:
            /wasmtime-44.0.1/crates/c-api/src/memory.rs</description>
        <pubDate>Mon, 19 May 2025 16:40:55 +0000</pubDate>
        <dc:creator>Alex Crichton &lt;alex@alexcrichton.com&gt;</dc:creator>
    </item>
<item>
        <title>ae84e6ed - Enable `unsafe-attr-outside-unsafe` 2024 edition lint (#9964)</title>
        <link>http://172.16.0.5:8080/history/wasmtime-44.0.1/crates/c-api/src/memory.rs#ae84e6ed</link>
        <description>Enable `unsafe-attr-outside-unsafe` 2024 edition lint (#9964)* Enable `unsafe-attr-outside-unsafe` 2024 edition lintThis commit enables the `unsafe-attr-outside-unsafe` lint in rustc usedin transitioning to the 2024 edition. This requires that the`#[no_mangle]` attribute is replaced in favor of `#[unsafe(no_mangle)]`.This mostly affects the C API of wasmtime and most of the changes hereare a simple search/replace.* Another attribute update* Fix command adapter build

            List of files:
            /wasmtime-44.0.1/crates/c-api/src/memory.rs</description>
        <pubDate>Thu, 09 Jan 2025 21:05:55 +0000</pubDate>
        <dc:creator>Alex Crichton &lt;alex@alexcrichton.com&gt;</dc:creator>
    </item>
<item>
        <title>420fc3d1 - c-api: Better differentiate between `wasm.h` and `wasmtime.h` APIs (#8344)</title>
        <link>http://172.16.0.5:8080/history/wasmtime-44.0.1/crates/c-api/src/memory.rs#420fc3d1</link>
        <description>c-api: Better differentiate between `wasm.h` and `wasmtime.h` APIs (#8344)This renames some types and adds some type aliases to help us better distinguishbetween `wasm.h` APIs and `wasmtime.h` APIs, primarily for `Store`-relatedtypes. In general, `WasmFoo` is related to `wasm.h` and `WasmtimeFoo` is relatedto `wasmtime.h`.* `StoreRef` -&gt; `WasmStoreRef`* Introduce the `WasmStore[Data]` and `WasmStoreContext[Mut]` aliases* `StoreData` -&gt; `WasmtimeStoreData`* `CStoreContext[Mut]` -&gt; `WasmtimeStoreContext[Mut]`* Introduce the `Wasmtime{Store,Caller}` aliases

            List of files:
            /wasmtime-44.0.1/crates/c-api/src/memory.rs</description>
        <pubDate>Fri, 12 Apr 2024 14:35:48 +0000</pubDate>
        <dc:creator>Nick Fitzgerald &lt;fitzgen@gmail.com&gt;</dc:creator>
    </item>
<item>
        <title>e68aa995 - Implement the memory64 proposal in Wasmtime (#3153)</title>
        <link>http://172.16.0.5:8080/history/wasmtime-44.0.1/crates/c-api/src/memory.rs#e68aa995</link>
        <description>Implement the memory64 proposal in Wasmtime (#3153)* Implement the memory64 proposal in WasmtimeThis commit implements the WebAssembly [memory64 proposal][proposal] inboth Wasmtime and Cranelift. In terms of work done Cranelift ended upneeding very little work here since most of it was already prepared for64-bit memories at one point or another. Most of the work in Wasmtime islargely refactoring, changing a bunch of `u32` values to something else.A number of internal and public interfaces are changing as a result ofthis commit, for example:* Acessors on `wasmtime::Memory` that work with pages now all return  `u64` unconditionally rather than `u32`. This makes it possible to  accommodate 64-bit memories with this API, but we may also want to  consider `usize` here at some point since the host can&apos;t grow past  `usize`-limited pages anyway.* The `wasmtime::Limits` structure is removed in favor of  minimum/maximum methods on table/memory types.* Many libcall intrinsics called by jit code now unconditionally take  `u64` arguments instead of `u32`. Return values are `usize`, however,  since the return value, if successful, is always bounded by host  memory while arguments can come from any guest.* The `heap_addr` clif instruction now takes a 64-bit offset argument  instead of a 32-bit one. It turns out that the legalization of  `heap_addr` already worked with 64-bit offsets, so this change was  fairly trivial to make.* The runtime implementation of mmap-based linear memories has changed  to largely work in `usize` quantities in its API and in bytes instead  of pages. This simplifies various aspects and reflects that  mmap-memories are always bound by `usize` since that&apos;s what the host  is using to address things, and additionally most calculations care  about bytes rather than pages except for the very edge where we&apos;re  going to/from wasm.Overall I&apos;ve tried to minimize the amount of `as` casts as possible,using checked `try_from` and checked arithemtic with either errorhandling or explicit `unwrap()` calls to tell us about bugs in thefuture. Most locations have relatively obvious things to do with variousimplications on various hosts, and I think they should all be roughly ofthe right shape but time will tell. I mostly relied on the compilercomplaining that various types weren&apos;t aligned to figure outtype-casting, and I manually audited some of the more obvious locations.I suspect we have a number of hidden locations that will panic on 32-bithosts if 64-bit modules try to run there, but otherwise I think weshould be generally ok (famous last words). In any case I wouldn&apos;t wantto enable this by default naturally until we&apos;ve fuzzed it for some time.In terms of the actual underlying implementation, no one should expectmemory64 to be all that fast. Right now it&apos;s implemented with&quot;dynamic&quot; heaps which have a few consequences:* All memory accesses are bounds-checked. I&apos;m not sure how aggressively  Cranelift tries to optimize out bounds checks, but I suspect not a ton  since we haven&apos;t stressed this much historically.* Heaps are always precisely sized. This means that every call to  `memory.grow` will incur a `memcpy` of memory from the old heap to the  new. We probably want to at least look into `mremap` on Linux and  otherwise try to implement schemes where dynamic heaps have some  reserved pages to grow into to help amortize the cost of  `memory.grow`.The memory64 spec test suite is scheduled to now run on CI, but as withall the other spec test suites it&apos;s really not all that comprehensive.I&apos;ve tried adding more tests for basic things as I&apos;ve had to implementguards for them, but I wouldn&apos;t really consider the testing adequatefrom just this PR itself. I did try to take care in one test to actuallyallocate a 4gb+ heap and then avoid running that in the poolingallocator or in emulation because otherwise that may fail or takeexcessively long.[proposal]: https://github.com/WebAssembly/memory64/blob/master/proposals/memory64/Overview.md* Fix some tests* More test fixes* Fix wasmtime tests* Fix doctests* Revert to 32-bit immediate offsets in `heap_addr`This commit updates the generation of addresses in wasm code to alwaysuse 32-bit offsets for `heap_addr`, and if the calculated offset isbigger than 32-bits we emit a manual add with an overflow check.* Disable memory64 for spectest fuzzing* Fix wrong offset being added to heap addr* More comments!* Clarify bytes/pages

            List of files:
            /wasmtime-44.0.1/crates/c-api/src/memory.rs</description>
        <pubDate>Thu, 12 Aug 2021 14:40:20 +0000</pubDate>
        <dc:creator>Alex Crichton &lt;alex@alexcrichton.com&gt;</dc:creator>
    </item>
<item>
        <title>7a1b7cdf - Implement RFC 11: Redesigning Wasmtime&apos;s APIs (#2897)</title>
        <link>http://172.16.0.5:8080/history/wasmtime-44.0.1/crates/c-api/src/memory.rs#7a1b7cdf</link>
        <description>Implement RFC 11: Redesigning Wasmtime&apos;s APIs (#2897)Implement Wasmtime&apos;s new API as designed by RFC 11. This is quite a large commit which has had lots of discussion externally, so for more information it&apos;s best to read the RFC thread and the PR thread.

            List of files:
            /wasmtime-44.0.1/crates/c-api/src/memory.rs</description>
        <pubDate>Thu, 03 Jun 2021 14:10:53 +0000</pubDate>
        <dc:creator>Alex Crichton &lt;alex@alexcrichton.com&gt;</dc:creator>
    </item>
<item>
        <title>f12b4c46 - Add resource limiting to the Wasmtime API. (#2736)</title>
        <link>http://172.16.0.5:8080/history/wasmtime-44.0.1/crates/c-api/src/memory.rs#f12b4c46</link>
        <description>Add resource limiting to the Wasmtime API. (#2736)* Add resource limiting to the Wasmtime API.This commit adds a `ResourceLimiter` trait to the Wasmtime API.When used in conjunction with `Store::new_with_limiter`, this can be used tomonitor and prevent WebAssembly code from growing linear memories and tables.This is particularly useful when hosts need to take into account host resourceusage to determine if WebAssembly code can consume more resources.A simple `StaticResourceLimiter` is also included with these changes that willsimply limit the size of linear memories or tables for all instances created inthe store based on static values.* Code review feedback.* Implemented `StoreLimits` and `StoreLimitsBuilder`.* Moved `max_instances`, `max_memories`, `max_tables` out of `Config` and into  `StoreLimits`.* Moved storage of the limiter in the runtime into `Memory` and `Table`.* Made `InstanceAllocationRequest` use a reference to the limiter.* Updated docs.* Made `ResourceLimiterProxy` generic to remove a level of indirection.* Fixed the limiter not being used for `wasmtime::Memory` and  `wasmtime::Table`.* Code review feedback and bug fix.* `Memory::new` now returns `Result&lt;Self&gt;` so that an error can be returned if  the initial requested memory exceeds any limits placed on the store.* Changed an `Arc` to `Rc` as the `Arc` wasn&apos;t necessary.* Removed `Store` from the `ResourceLimiter` callbacks. Custom resource limiter  implementations are free to capture any context they want, so no need to  unnecessarily store a weak reference to `Store` from the proxy type.* Fixed a bug in the pooling instance allocator where an instance would be  leaked from the pool. Previously, this would only have happened if the OS was  unable to make the necessary linear memory available for the instance. With  these changes, however, the instance might not be created due to limits  placed on the store. We now properly deallocate the instance on error.* Added more tests, including one that covers the fix mentioned above.* Code review feedback.* Add another memory to `test_pooling_allocator_initial_limits_exceeded` to  ensure a partially created instance is successfully deallocated.* Update some doc comments for better documentation of `Store` and  `ResourceLimiter`.

            List of files:
            /wasmtime-44.0.1/crates/c-api/src/memory.rs</description>
        <pubDate>Mon, 19 Apr 2021 14:19:20 +0000</pubDate>
        <dc:creator>Peter Huene &lt;peter@huene.dev&gt;</dc:creator>
    </item>
<item>
        <title>cca558cd - Remove `HostRef&lt;T&gt;` from the C API (#1926)</title>
        <link>http://172.16.0.5:8080/history/wasmtime-44.0.1/crates/c-api/src/memory.rs#cca558cd</link>
        <description>Remove `HostRef&lt;T&gt;` from the C API (#1926)This commit removes `HostRef&lt;T&gt;` from the C API which only served thepurpose now of converting each type to a `wasm_ref_t*`. Ourimplementation, however, does not guarantee that you&apos;ll get the same`wasm_ref_t*` for each actual underlying item (e.g. if you put a func ina table and then get the func as an export and from the table then`same` will report `false`). Additionally the fate of `wasm_ref_t*`seems somewhat unclear at this point.The change here is to make the `same` and cast functions all abortsaying they&apos;re unimplemented. (similar to the host info functions). Ifand when we get around to reimplementing these functions we can ensurethey&apos;re implemented uniformly and work well for all intended use cases.

            List of files:
            /wasmtime-44.0.1/crates/c-api/src/memory.rs</description>
        <pubDate>Fri, 26 Jun 2020 19:34:34 +0000</pubDate>
        <dc:creator>Alex Crichton &lt;alex@alexcrichton.com&gt;</dc:creator>
    </item>
<item>
        <title>e40c039e - wasmtime: Rip out incomplete/incorrect externref &quot;host info&quot; support</title>
        <link>http://172.16.0.5:8080/history/wasmtime-44.0.1/crates/c-api/src/memory.rs#e40c039e</link>
        <description>wasmtime: Rip out incomplete/incorrect externref &quot;host info&quot; supportBetter to be loud that we don&apos;t support attaching arbitrary host info to`externref`s than to limp along and pretend we do support it. Supporting itproperly won&apos;t reuse any of this code anyways.

            List of files:
            /wasmtime-44.0.1/crates/c-api/src/memory.rs</description>
        <pubDate>Thu, 25 Jun 2020 17:24:40 +0000</pubDate>
        <dc:creator>Nick Fitzgerald &lt;fitzgen@gmail.com&gt;</dc:creator>
    </item>
<item>
        <title>58b08b9d - Move `HostRef&lt;T&gt;` into the C API crate</title>
        <link>http://172.16.0.5:8080/history/wasmtime-44.0.1/crates/c-api/src/memory.rs#58b08b9d</link>
        <description>Move `HostRef&lt;T&gt;` into the C API crateIt isn&apos;t used by anything except for the C API and all of our embedder-exposedAPIs are already internally `Rc`-based, so it doesn&apos;t make sense to use withthem.

            List of files:
            /wasmtime-44.0.1/crates/c-api/src/memory.rs</description>
        <pubDate>Mon, 01 Jun 2020 21:48:45 +0000</pubDate>
        <dc:creator>Nick Fitzgerald &lt;fitzgen@gmail.com&gt;</dc:creator>
    </item>
<item>
        <title>a8ee0554 - wasmtime: Initial, partial support for `externref`</title>
        <link>http://172.16.0.5:8080/history/wasmtime-44.0.1/crates/c-api/src/memory.rs#a8ee0554</link>
        <description>wasmtime: Initial, partial support for `externref`This is enough to get an `externref -&gt; externref` identity functionpassing.However, `externref`s that are dropped by compiled Wasm code are (safely)leaked. Follow up work will leverage cranelift&apos;s stack maps to resolve thisissue.

            List of files:
            /wasmtime-44.0.1/crates/c-api/src/memory.rs</description>
        <pubDate>Sat, 23 May 2020 00:12:45 +0000</pubDate>
        <dc:creator>Nick Fitzgerald &lt;fitzgen@gmail.com&gt;</dc:creator>
    </item>
<item>
        <title>f28b3738 - Rename `anyref` to `externref` across the board</title>
        <link>http://172.16.0.5:8080/history/wasmtime-44.0.1/crates/c-api/src/memory.rs#f28b3738</link>
        <description>Rename `anyref` to `externref` across the board

            List of files:
            /wasmtime-44.0.1/crates/c-api/src/memory.rs</description>
        <pubDate>Wed, 20 May 2020 18:55:30 +0000</pubDate>
        <dc:creator>Nick Fitzgerald &lt;fitzgen@gmail.com&gt;</dc:creator>
    </item>
<item>
        <title>9364eb1d - Refactor (#1524)</title>
        <link>http://172.16.0.5:8080/history/wasmtime-44.0.1/crates/c-api/src/memory.rs#9364eb1d</link>
        <description>Refactor (#1524)* Compute instance exports on demand.Instead having instances eagerly compute a Vec of Externs, and bumpingthe refcount for each Extern, compute Externs on demand.This also enables `Instance::get_export` to avoid doing a linear search.This also means that the closure returned by `get0` and friends nowholds an `InstanceHandle` to dynamically hold the instance live ratherthan being scoped to a lifetime.* Compute module imports and exports on demand too.And compute Extern::ty on demand too.* Add a utility function for computing an ExternType.* Add a utility function for looking up a function&apos;s signature.* Add a utility function for computing the ValType of a Global.* Rename wasmtime_environ::Export to EntityIndex.This helps differentiate it from other Export types in the tree, anddescribes what it is.* Fix a typo in a comment.* Simplify module imports and exports.* Make `Instance::exports` return the export names.This significantly simplifies the public API, as it&apos;s relatively commonto need the names, and this avoids the need to do a zip with`Module::exports`.This also changes `ImportType` and `ExportType` to have public membersinstead of private members and accessors, as I find that simplifies theusage particularly in cases where there are temporary instances.* Remove `Instance::module`.This doesn&apos;t quite remove `Instance`&apos;s `module` member, it gets a stepcloser.* Use a InstanceHandle utility function.* Don&apos;t consume self in the `Func::get*` methods.Instead, just create a closure containing the instance handle and theexport for them to call.* Use `ExactSizeIterator` to avoid needing separate `num_*` methods.* Rename `Extern::func()` etc. to `into_func()` etc.* Revise examples to avoid using `nth`.* Add convenience methods to instance for getting specific extern types.* Use the convenience functions in more tests and examples.* Avoid cloning strings for `ImportType` and `ExportType`.* Remove more obviated clone() calls.* Simplify `Func`&apos;s closure state.* Make wasmtime::Export&apos;s fields private.This makes them more consistent with ExportType.* Fix compilation error.* Make a lifetime parameter explicit, and use better lifetime names.Instead of &apos;me, use &apos;instance and &apos;module to make it clear what thelifetime is.* More lifetime cleanups.

            List of files:
            /wasmtime-44.0.1/crates/c-api/src/memory.rs</description>
        <pubDate>Mon, 20 Apr 2020 20:55:33 +0000</pubDate>
        <dc:creator>Dan Gohman &lt;sunfish@mozilla.com&gt;</dc:creator>
    </item>
<item>
        <title>6ef09359 - Refactor and fill out wasmtime&apos;s C API (#1415)</title>
        <link>http://172.16.0.5:8080/history/wasmtime-44.0.1/crates/c-api/src/memory.rs#6ef09359</link>
        <description>Refactor and fill out wasmtime&apos;s C API (#1415)* Refactor and improve safety of C APIThis commit is intended to be a relatively large refactoring of the CAPI which is targeted at improving the safety of our C API definitions.Not all of the APIs have been updated yet but this is intended to be thestart.The goal here is to make as many functions safe as we can, expressinginputs/outputs as native Rust types rather than raw pointers whereverpossible. For example instead of `*const wasm_foo_t` we&apos;d take`&amp;wasm_foo_t`. Instead of returning `*mut wasm_foo_t` we&apos;d return`Box&lt;wasm_foo_t&gt;`. No ABI/API changes are intended from this commit,it&apos;s supposed to only change how we define all these functionsinternally.This commit also additionally implements a few more API bindings forexposed vector types by unifying everything into one macro.Finally, this commit moves many internal caches in the C API to the`OnceCell` type which provides a safe interface for one-timeinitialization.* Split apart monolithic C API `lib.rs`This commit splits the monolithic `src/lib.rs` in the C API crate intolots of smaller files. The goal here is to make this a bit more readableand digestable. Each module now contains only API bindings for aparticular type, roughly organized around the grouping in the wasm.hheader file already.A few more extensions were added, such as filling out `*_as_*`conversions with both const and non-const versions. Additionally manyAPIs were made safer in the same style as the previous commit, generallypreferring Rust types rather than raw pointer types.Overall no functional change is intended here, it should be mostly justcode movement and minor refactorings!* Make a few wasi C bindings saferUse safe Rust types where we can and touch up a few APIs here and there.* Implement `wasm_*type_as_externtype*` APIsThis commit restructures `wasm_externtype_t` to be similar to`wasm_extern_t` so type conversion between the `*_extern_*` variants tothe concrete variants are all simple casts. (checked in the case ofgeneral to concrete, of course).* Consistently imlpement host info functions in the APIThis commit adds a small macro crate which is then used to consistentlydefine the various host-info-related functions in the C API. The goalhere is to try to mirror what the `wasm.h` header provides to provide afull implementation of the header.

            List of files:
            /wasmtime-44.0.1/crates/c-api/src/memory.rs</description>
        <pubDate>Fri, 27 Mar 2020 14:50:32 +0000</pubDate>
        <dc:creator>Alex Crichton &lt;alex@alexcrichton.com&gt;</dc:creator>
    </item>
</channel>
</rss>
