MCPcopy Create free account
hub / github.com/3proxy/3proxy / myrealloc

Function myrealloc

src/myalloc.c:328–339  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

326
327
328void *myrealloc(void *ptr, size_t size){
329 unsigned l;
330 void * p;
331 l = myfindsize(ptr, NULL, NULL);
332 if(size <= memsizes[l]) return ptr;
333 p = myalloc(size);
334 if(p){
335 memmove(p,ptr,size);
336 myfree(ptr);
337 }
338 return p;
339}
340
341
342#ifdef WITH_MAIN

Callers 2

proxychildFunction · 0.85
parsestrFunction · 0.85

Calls 3

myfindsizeFunction · 0.85
myallocFunction · 0.85
myfreeFunction · 0.85

Tested by

no test coverage detected