| iMatix home page | << | < | > | >> |
SFL Version 2.11 |
Filename: sflmem.h
Package: Standard Function Library (SFL)
Written: 1996/06/08 iMatix SFL project team sfl@imatix.com
Revised: 1999/12/28
Copyright: Copyright (c) 1996-2000 iMatix Corporation
Encapsulated memory allocation functions. Based on an article by Jim Schimandle in DDJ August 1990. Provides 'safe' versions of malloc(), realloc(), free(), and strdup(). These functions protect the programmer from errors in calling memory allocation/free routines. When these calls are used, the allocation routines in this module add a data structure to the top of allocated memory blocks which tags them as legal memory blocks. When the free routine is called, the memory block to be freed is checked for legality. If the block is not legal, the memory list is dumped to stderr and the program is terminated. Some of these functions are called through macros that add the filename and line number of the call, for tracing. Do not call these functions directly.
sflmem.h defines these symbols, possibly conditionally:
Symbol: | Defined as: |
---|---|
SFLMEM_INCLUDED | TRUE |
mem_alloc(n) | (various) |
mem_assert() | (various) |
mem_check(p) | (various) |
mem_checkall() | (various) |
mem_commit(t) | (various) |
mem_descr(p,n) | (various) |
mem_free(p) | (various) |
mem_new_trans() | (various) |
mem_realloc(p,n) | (various) |
mem_rollback(t) | (various) |
mem_size(p) | (various) |
mem_strdup(s) | (various) |
mem_strfree(ps) | (various) |
memt_alloc(t,n) | (various) |
memt_descr(t,p,n) | (various) |
memt_strdup(t,s) | (various) |
Type name: | Defined as: |
---|---|
MEMHDR | struct _MEMHDR |
MEMTRN | struct _MEMTRN |
scavenger | Bool (*) (void *) |
| << | < | > | >> | Copyright © 1996-2000 iMatix Corporation |