MCPcopy Create free account
hub / github.com/F-Stack/f-stack / mallocarray

Function mallocarray

freebsd/kern/kern_malloc.c:797–805  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

795}
796
797void *
798mallocarray(size_t nmemb, size_t size, struct malloc_type *type, int flags)
799{
800
801 if (WOULD_OVERFLOW(nmemb, size))
802 panic("mallocarray: %zu * %zu overflowed", nmemb, size);
803
804 return (malloc(size * nmemb, type, flags));
805}
806
807#ifdef INVARIANTS
808static void

Callers 15

intr_irq_initFunction · 0.70
intr_map_initFunction · 0.70
kern_pollFunction · 0.70
pf_init_tagsetFunction · 0.50
pfioctlFunction · 0.50
pfsync_clone_createFunction · 0.50
pf_initializeFunction · 0.50
fq_pie_new_schedFunction · 0.50
fq_codel_new_schedFunction · 0.50
heap_resizeFunction · 0.50
bsearch4_initFunction · 0.50
bsearch4_build_arrayFunction · 0.50

Calls 3

mallocFunction · 0.85
panicFunction · 0.70
WOULD_OVERFLOWFunction · 0.50

Tested by

no test coverage detected