Previous Page: CPXreadcopyvecFirst PageNext Page: CPXrhssa

CPXrealloc


Description

The routine CPXrealloc() is used to reallocate memory on the system heap that is managed by the CPLEX Callable Library. It has the same semantics as the standard C library function realloc(). Note that memory allocated by CPXrealloc() should be freed by calling CPXfree(). The pointers passed to CPXrealloc() should be pointers returned by one of the CPLEX routines, and not pointers returned by the standard C library function malloc().

Return Value

The routine returns a pointer to a block of reallocated memory, or NULL if no memory is available.

Synopsis

CPXVOIDptr CPXrealloc (void *ptr,
                       size_t size);

Arguments


void *ptr
A pointer to a block of memory allocated by CPLEX that requires reallocation.

size_t size
The new size of the block.

Example

q = CPXrealloc (p, 100);

Previous Page: CPXreadcopyvecFirst PageNext Page: CPXrhssa