3 ms·
But again, not exploited by the code in question. This isn't using the Rust runtime heap, it's doing its own thing with raw pointers/indexing, and even seems t
by ajross 2y ago
But again, not exploited by the code in question. This isn't using the Rust runtime heap, it's doing its own thing with raw pointers/indexing, and even seems to have its own allocator.
- steveklabnik 2y ago> This isn't using the Rust runtime heap, Rust does not have a specific "Rust runtime heap."
- IshKebab 2y agoIt does, it has a default global heap allocator.
- simonask 2y agoThat's not a "Rust runtime", that's an extension point. The default setting is `malloc()`.
- steveklabnik 2y agoThat's not part of Rust, that's a feature of its standard library. This is the same as C, where a freestanding implementation doesn't include malloc. Put another way, there's no issues with a library using its own heap if it wants to.
- ComputerGuru 2y agoThat is not correct; in another comment you can see where the code takes advantage of the rust-specific &mut notation to use a fast memcpy for non-overlapping pointers.