MCPcopy Index your code
hub / github.com/aiscriptdev/aiscript / allocate

Method allocate

aiscript-arena/src/allocator_api.rs:64–68  ·  view source on GitHub ↗
(&self, layout: Layout)

Source from the content-addressed store, hash-verified

62unsafe impl<A: Allocator> Allocator for MetricsAlloc<'_, A> {
63 #[inline]
64 fn allocate(&self, layout: Layout) -> Result<NonNull<[u8]>, AllocError> {
65 let ptr = self.allocator.allocate(layout)?;
66 self.metrics.mark_external_allocation(layout.size());
67 Ok(ptr)
68 }
69
70 #[inline]
71 unsafe fn deallocate(&self, ptr: NonNull<u8>, layout: Layout) {

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected