wnmlc(3)

NAME

wn_f_malloc, wn_f_calloc, wn_f_free, wn_f_cfree - simple
substitutions for malloc calls

SYNOPSIS

#include <wn/wnmlc.h>
char *wn_f_malloc(size)
unsigned int size;
char *wn_f_calloc(nelem,elsize)
unsigned int nelem,elsize;
wn_f_free(p)
char *p;
wn_f_cfree(p)
char *p;

DESCRIPTION

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 gener
al_free memory group, labeled as "wn_f_malloc_group".
Use of these calls should be only a first step in replac
ing all malloc(3) calls with wn_mem calls.

DIAGNOSTICS

Same as wnmem.

SEE ALSO

wnmem, wnmemd, malloc(3)

AUTHOR

Will Naylor
WNLIB August 23, 1998
Copyright © 2010-2025 Platon Technologies, s.r.o.           Home | Man pages | tLDP | Documents | Utilities | About
Design by styleshout