Home

Traffic Server Software Developers Kit

INKrealloc

Changes the size of an allocated block of memory.

Prototype

void* INKrealloc (void *ptr, unsigned int size)

Arguments

ptr is the pointer to the memory to reallocate.

size is the number of bytes to allocate.

Description

Changes the size of the memory block pointed to by ptr to size bytes, and returns a pointer to the new block. Because it may not be possible to simply extend ptr to satisfy a request to increase the allocated block, the returned pointer might point to a new block of memory. If ptr is NULL, then INKrealloc behaves like INKmalloc and returns a pointer to the newly-allocated memory.

Returns

A pointer to the reallocated memory.