Back to libut API Reference


SYNOPSIS

    #include "libut/ut.h"
    void UT_mem_free(char *poolname, void *addr, int num_bufs);


DESCRIPTION

This function frees num_bufs buffers starting at address addr that were previously allocated from pool poolname using UT_mem_alloc(3). There is no return value. If an error occurs, such as an attempt to free a buffer which is already free, a log message is written.


RELATED CONTROL PORT COMMANDS

The mem control port command reports memory usage statistics for each pool. This command displays memory usage both in terms of buffers and kilobytes for each pool. It can also report on number of buffers allocated and freed since the pool was defined. The latter usage helps to expose memory leaks.


SEE ALSO

UT_mem_alloc(3), UT_mem_pool_create(3)


AUTHOR

Troy D. Hanson <thanson@users.sourceforge.net>