MCPcopy Create free account
hub / github.com/acking-you/static_flow / realloc

Method realloc

crates/backend/src/memory_profiler.rs:794–803  ·  view source on GitHub ↗
(&self, ptr: *mut u8, layout: Layout, new_size: usize)

Source from the content-addressed store, hash-verified

792 }
793
794 unsafe fn realloc(&self, ptr: *mut u8, layout: Layout, new_size: usize) -> *mut u8 {
795 let next_ptr = self.inner.realloc(ptr, layout, new_size);
796 if !next_ptr.is_null() {
797 let usable = self.inner.usable_size(next_ptr);
798 if let Some(profiler) = profiler() {
799 profiler.on_realloc(ptr, next_ptr, usable);
800 }
801 }
802 next_ptr
803 }
804}
805
806thread_local! {

Callers

nothing calls this directly

Calls 2

profilerFunction · 0.85
on_reallocMethod · 0.80

Tested by

no test coverage detected