4 * Control of indirected data allocation
6 * © 1994-1998 Straylight
9 /*----- Licensing note ----------------------------------------------------*
11 * This file is part of Straylight's Glass.
13 * Glass is free software; you can redistribute it and/or modify
14 * it under the terms of the GNU General Public License as published by
15 * the Free Software Foundation; either version 2, or (at your option)
18 * Glass is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU General Public License for more details.
23 * You should have received a copy of the GNU General Public License
24 * along with Glass. If not, write to the Free Software Foundation,
25 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
31 /*----- External routines -------------------------------------------------*/
35 typedef unsigned int size_t; /* from <stddef.h> */
39 * void indir_init(void)
42 * Jumps in to ensure that indir gets the first flex block, so it doesn't
46 void indir_init(void);
49 * void *indir_alloc(int size)
52 * Allocate memory from heap.
55 * int size == the number of bytes the caller wants
58 void *indir_alloc(size_t size);
61 * void indir_free(void *p)
64 * Reclaims the memory from the block pointed to by p. Some simple checks
65 * are used to ensure that p is valid.
68 * void *p == pointer to a block to free.
71 void indir_free(void *p);
74 * void *indir_realloc(void *p,int newsize)
77 * Resizes a heap block.
80 * void *p == pointer to block to resize
81 * int newsize == the new size to make it
84 * Pointer to the block (may have moved) or 0 (failure, block didn't move)
87 void *indir_realloc(void *p,int newsize);
90 * void indir_heapInfo(void)
93 * Displays a dialogue box showing current heap stats
96 void indir_heapInfo(void);