The Complete SPRLIB & ANNLIB

free_monitor

- an SPRANNLIB replacement for the free routine

SYNOPSIS

void free_monitor (ptr, file, line)

ARGUMENTS

char *ptr A pointer to the block of memory to be deallocated.
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

Nothing.

FUNCTION

This function can replace the standard C-function free. 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, free is called and the MALINFO structure is removed from the list.

NOTE

The routine can only free blocks of memory allocated using one of the ...alloc_monitor functions below. If topmem is NULL after the freeing, the reset_sigsegv_handler is called.

SEE ALSO

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

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