Loads a `CodeMemory` from the specified in-memory slice, copying it to a uniquely owned mmap. The `expected` marker here is whether the bytes are expected to be a precompiled module or a component.
(
&self,
bytes: &[u8],
expected: ObjectKind,
)
| 881 | /// The `expected` marker here is whether the bytes are expected to be a |
| 882 | /// precompiled module or a component. |
| 883 | pub(crate) fn load_code_bytes( |
| 884 | &self, |
| 885 | bytes: &[u8], |
| 886 | expected: ObjectKind, |
| 887 | ) -> Result<Arc<crate::CodeMemory>> { |
| 888 | self.load_code( |
| 889 | crate::runtime::vm::MmapVec::from_slice_with_alignment( |
| 890 | bytes, |
| 891 | self.required_code_alignment(), |
| 892 | )?, |
| 893 | expected, |
| 894 | ) |
| 895 | } |
| 896 | |
| 897 | /// Loads a `CodeMemory` from the specified memory region without copying |
| 898 | /// |
no test coverage detected