wn_f_cfree3
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.