carta
wn_f_free(3)

wn_f_free3

Simple substitutions for malloc calls

Part of wnmlc(3).

Usage

char *wn_f_malloc(size)

unsigned int size;

char *wn_f_calloc(nelem,elsize)

unsigned int nelem,elsize;

char *p;

char *p;

Overview

These calls allow mechanical replacement of malloc(3) calls by calls based on wnmem. Simply add the prefix "wn_f_" to all malloc calls.

Doing so gives the following advantages:

- Less paging.

- Debugging using wn_memd calls works.

Memory allocated using these calls comes from a general_free memory group, labeled as "wn_f_malloc_group".

Use of these calls should be only a first step in replacing all malloc(3) calls with wn_mem calls.

Diagnostics

Same as wnmem.

Author

Will Naylor

From libwn-dev 6.0-17 in Debian 4.0 (Etch). Parsed by carta from the page's man source.