blob: 56115e7d1e2c8084cf98fc29944576f587e1433d (
plain)
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
|
/**CFile****************************************************************
FileName [asatmem.h]
PackageName [SAT solver.]
Synopsis [Memory management.]
Author [Alan Mishchenko <alanmi@eecs.berkeley.edu>]
Affiliation [UC Berkeley]
Date [Ver. 1.0. Started - January 1, 2004.]
Revision [$Id: asatmem.h,v 1.0 2004/01/01 1:00:00 alanmi Exp $]
***********************************************************************/
#ifndef __ASAT_MEM_H__
#define __ASAT_MEM_H__
////////////////////////////////////////////////////////////////////////
/// INCLUDES ///
////////////////////////////////////////////////////////////////////////
//#include "leaks.h"
#include <stdio.h>
#include <stdlib.h>
////////////////////////////////////////////////////////////////////////
/// PARAMETERS ///
////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////
/// STRUCTURE DEFINITIONS ///
////////////////////////////////////////////////////////////////////////
typedef struct Asat_MmFixed_t_ Asat_MmFixed_t;
typedef struct Asat_MmFlex_t_ Asat_MmFlex_t;
typedef struct Asat_MmStep_t_ Asat_MmStep_t;
////////////////////////////////////////////////////////////////////////
/// GLOBAL VARIABLES ///
////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////
/// MACRO DEFINITIONS ///
////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////
/// FUNCTION DECLARATIONS ///
////////////////////////////////////////////////////////////////////////
// fixed-size-block memory manager
extern Asat_MmFixed_t * Asat_MmFixedStart( int nEntrySize );
extern void Asat_MmFixedStop( Asat_MmFixed_t * p, int fVerbose );
extern char * Asat_MmFixedEntryFetch( Asat_MmFixed_t * p );
extern void Asat_MmFixedEntryRecycle( Asat_MmFixed_t * p, char * pEntry );
extern void Asat_MmFixedRestart( Asat_MmFixed_t * p );
extern int Asat_MmFixedReadMemUsage( Asat_MmFixed_t * p );
// flexible-size-block memory manager
extern Asat_MmFlex_t * Asat_MmFlexStart();
extern void Asat_MmFlexStop( Asat_MmFlex_t * p, int fVerbose );
extern char * Asat_MmFlexEntryFetch( Asat_MmFlex_t * p, int nBytes );
extern int Asat_MmFlexReadMemUsage( Asat_MmFlex_t * p );
// hierarchical memory manager
extern Asat_MmStep_t * Asat_MmStepStart( int nSteps );
extern void Asat_MmStepStop( Asat_MmStep_t * p, int fVerbose );
extern char * Asat_MmStepEntryFetch( Asat_MmStep_t * p, int nBytes );
extern void Asat_MmStepEntryRecycle( Asat_MmStep_t * p, char * pEntry, int nBytes );
extern int Asat_MmStepReadMemUsage( Asat_MmStep_t * p );
////////////////////////////////////////////////////////////////////////
/// END OF FILE ///
////////////////////////////////////////////////////////////////////////
#endif
|