MCPcopy Create free account
hub / github.com/couchbase/forestdb / mem_double

Function mem_double

utils/iniparser.cc:218–226  ·  view source on GitHub ↗

Doubles the allocated size associated to a pointer 'size' is the current allocated size. */

Source from the content-addressed store, hash-verified

216 'size' is the current allocated size.
217 */
218static void * mem_double(void * ptr, int size)
219{
220 void *newptr;
221
222 newptr = calloc(2*size, 1);
223 memcpy(newptr, ptr, size);
224 free(ptr);
225 return newptr ;
226}
227
228
229/*---------------------------------------------------------------------------

Callers 1

dictionary_setFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected