MCPcopy Create free account
hub / github.com/CppCXY/EmmyLuaCodeStyle / mi_reallocarr

Function mi_reallocarr

3rd/mimalloc-2.0.9/src/alloc-posix.c:107–115  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

105}
106
107mi_decl_nodiscard int mi_reallocarr( void* p, size_t count, size_t size ) mi_attr_noexcept { // NetBSD
108 mi_assert(p != NULL);
109 if (p == NULL) {
110 errno = EINVAL;
111 return EINVAL;
112 }
113 void** op = (void**)p;
114 void* newp = mi_reallocarray(*op, count, size);
115 if mi_unlikely(newp == NULL) { return errno; }
116 *op = newp;
117 return 0;
118}

Callers 1

reallocarrFunction · 0.85

Calls 2

mi_reallocarrayFunction · 0.85
mi_unlikelyFunction · 0.85

Tested by

no test coverage detected