Debian Codegraph @

addons/ooh323c/src/memheap.h

raw symbols SCIP
1 /*
2 * Copyright (C) 2004-2005 by Objective Systems, Inc.
3 *
4 * This software is furnished under an open source license and may be
5 * used and copied only in accordance with the terms of this license.
6 * The text of the license may generally be found in the root
7 * directory of this installation in the COPYING file. It
8 * can also be viewed online at the following URL:
9 *
10 * http://www.obj-sys.com/open/license.html
11 *
12 * Any redistributions of this file including modified versions must
13 * maintain this copyright notice.
14 *
15 *****************************************************************************/
16
17 #ifndef __RTMEMHEAP_HH__
18 #define __RTMEMHEAP_HH__
19
20 #include "ooasn1.h"
21
22 /* internal heap flags */
23 #define RT_MH_INTERNALMASK 0xF0000000u
24 #define RT_MH_FREEHEAPDESC 0x10000000u
25
26 typedef struct OSMemLink {
27 struct OSMemLink* pnext;
28 struct OSMemLink* pprev;
29 struct OSMemLink* pnextRaw; /* next RAW block */
30 void* pMemBlk;
31 ASN1OCTET blockType; /* 1 = standard, 2 = raw (see RTMEM* flags) */
32 } OSMemLink;
33
34 /* MemLink blockTypes */
35 #define RTMEMSTD 0x0001
36 #define RTMEMRAW 0x0002
37 #define RTMEMMALLOC 0x0004
38 #define RTMEMSAVED 0x0008
39 #define RTMEMLINK 0x0010 /* contains MemLink */
40
41 /* ASN.1 memory allocation structures */
42
43 typedef struct OSMemHeap {
44 OSMemLink* phead;
45 ASN1UINT usedUnits;
46 ASN1UINT usedBlocks;
47 ASN1UINT freeUnits;
48 ASN1UINT freeBlocks;
49 ASN1UINT keepFreeUnits;
50 ASN1UINT defBlkSize;
51 ASN1UINT refCnt;
52 ASN1UINT flags;
53 ast_mutex_t pLock;
54 } OSMemHeap;
55
56 /* see rtMemDefs.c file */
57 extern ASN1UINT g_defBlkSize;
58 extern OSMallocFunc g_malloc_func;
59 extern OSReallocFunc g_realloc_func;
60 extern OSFreeFunc g_free_func;
61
62 #endif /* __RTMEMHEAP_HH__ */