File: memory.h

package info (click to toggle)
grcompiler 5.2.1-1
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 24,020 kB
  • sloc: cpp: 48,200; ansic: 7,670; sh: 4,427; makefile: 197; xml: 190; perl: 127; sed: 21
file content (61 lines) | stat: -rw-r--r-- 1,760 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
/******************************************************************************
 *                               FREXXWARE
 * ----------------------------------------------------------------------------
 *
 * Project: Frexx C Preprocessor
 * $Source: /cvsroot/silgraphite/silgraphite/src/GrCompiler/GdlPp/memory.h,v $
 * $Revision: 1.1 $
 * $Date: 2003/04/21 21:24:18 $
 * $Author: wardak $
 * $State: Exp $
 * $Locker:  $
 *
 * ----------------------------------------------------------------------------
 * $Log: memory.h,v $
 * Revision 1.1  2003/04/21 21:24:18  wardak
 * Add files for the GDL pre-processor (gdlpp.exe).
 *
 * Revision 1.3  1993/12/06  13:51:20  start
 * A lot of new stuff (too much to mention)
 *
 * Revision 1.2  1993/11/11  07:16:39  start
 * New stuff
 *
 * Revision 1.2  1993/11/11  07:16:39  start
 * New stuff
 *
 * Revision 1.1  1993/11/03  09:15:59  start
 * Initial revision
 *
 *
 *****************************************************************************/
/******************************************************************************

 memory.h

 Structures and defines for memory functions.

 *****************************************************************************/

typedef struct MemInfo {
  struct MemInfo *prev;
  struct MemInfo *next;
  size_t size;
} MemInfo;

void Free(void *);
void FreeAll(void);
void *Malloc(size_t);
void *Realloc(void *, size_t);
#ifdef DEBUG
void CheckMem(void *);
#endif

#ifdef DEBUG
#define MEMORY_COOKIE 0		/* When using the DEBUG option, all Malloc()
				   will allocate a number of extra bytes at
				   the end of the block. These will be checked
				   to be intact when the block is freed or
				   CheckMem()'ed. This #define tells the size
				   of that block! */
#endif