The Complete SPRLIB & ANNLIB

realloc_monitor

- an SPRANNLIB replacement for the realloc routine

SYNOPSIS

char *realloc_monitor (ptr, size, file, line)

ARGUMENTS

char *ptr A pointer to the original allocated block.
unsigned int size The number of bytes the new block should have.
char *file The name of the source-file from which this function was called.
int line The line in the source-file from which this function was called.

RETURNS

A pointer to a reallocated block of memory if succesful, NULL if not.

FUNCTION

This function can replace the standard C-function realloc. It traverses the linked list of MALINFO structures (topmem, endmem - see MONITOR-ALLOCATION-variables). If it does not find ptr in the list, it gives an errormessage and returns TRUE. If it does find the pointer, realloc is called and the MALINFO structure is updated.

SEE ALSO

MONITOR-ALLOCATION-functions, malloc_monitor, calloc_monitor , free_monitor, status_monitor, memory_monitor

This document was generated using api2html on Thu Mar 5 09:00:00 MET DST 1998