MCPcopy Create free account
hub / github.com/adny-code/fastgrind / __wrap_valloc

Function __wrap_valloc

include/fastgrind.h:2268–2299  ·  view source on GitHub ↗

glibc function, glibc 2.12 abort this function

Source from the content-addressed store, hash-verified

2266
2267 // glibc function, glibc 2.12 abort this function
2268 MEM_NO_INSTRUMENT MEM_INLINE_USED inline void *__wrap_valloc(size_t size)
2269 {
2270 if (__mem_in_probe_)
2271 {
2272 #if defined(FASTGRIND_TC_MALLOC)
2273 return tc_valloc(size);
2274 #elif defined(FASTGRIND_JE_MALLOC)
2275 return je_valloc_emulate(size);
2276 #else
2277 return __real_valloc(size);
2278 #endif
2279 }
2280
2281 __mem_in_probe_ = true;
2282
2283 void *p =
2284 #if defined(FASTGRIND_TC_MALLOC)
2285 tc_valloc(size);
2286 #elif defined(FASTGRIND_JE_MALLOC)
2287 je_valloc_emulate(size);
2288 #else
2289 __real_valloc(size);
2290 #endif
2291
2292 if (p)
2293 {
2294 memLocalInfo::instance().add(malloc_usable_size(p));
2295 }
2296
2297 __mem_in_probe_ = false;
2298 return p;
2299 }
2300
2301 // glibc function, glibc 2.12 abort this function
2302 MEM_NO_INSTRUMENT MEM_INLINE_USED inline void *__wrap_pvalloc(size_t size)

Callers

nothing calls this directly

Calls 2

je_valloc_emulateFunction · 0.85
addMethod · 0.45

Tested by

no test coverage detected