abc-master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
mem.h
Go to the documentation of this file.
1 /**CFile****************************************************************
2 
3  FileName [mem.h]
4 
5  SystemName [ABC: Logic synthesis and verification system.]
6 
7  PackageName [Memory management.]
8 
9  Synopsis [External declarations.]
10 
11  Author [Alan Mishchenko]
12 
13  Affiliation [UC Berkeley]
14 
15  Date [Ver. 1.0. Started - June 20, 2005.]
16 
17  Revision [$Id: mem.h,v 1.00 2005/06/20 00:00:00 alanmi Exp $]
18 
19 ***********************************************************************/
20 
21 #ifndef ABC__aig__mem__mem_h
22 #define ABC__aig__mem__mem_h
23 
24 #include "misc/util/abc_global.h"
25 
27 
28 
29 ////////////////////////////////////////////////////////////////////////
30 /// DECLARATIONS ///
31 ////////////////////////////////////////////////////////////////////////
32 
33 typedef struct Mem_Fixed_t_ Mem_Fixed_t;
34 typedef struct Mem_Flex_t_ Mem_Flex_t;
35 typedef struct Mem_Step_t_ Mem_Step_t;
36 
37 ////////////////////////////////////////////////////////////////////////
38 /// FUNCTION DEFINITIONS ///
39 ////////////////////////////////////////////////////////////////////////
40 
41 /*=== mem.c ===========================================================*/
42 // fixed-size-block memory manager
43 extern Mem_Fixed_t * Mem_FixedStart( int nEntrySize );
44 extern void Mem_FixedStop( Mem_Fixed_t * p, int fVerbose );
45 extern char * Mem_FixedEntryFetch( Mem_Fixed_t * p );
46 extern void Mem_FixedEntryRecycle( Mem_Fixed_t * p, char * pEntry );
47 extern void Mem_FixedRestart( Mem_Fixed_t * p );
48 extern int Mem_FixedReadMemUsage( Mem_Fixed_t * p );
50 // flexible-size-block memory manager
51 extern Mem_Flex_t * Mem_FlexStart();
52 extern void Mem_FlexStop( Mem_Flex_t * p, int fVerbose );
53 extern char * Mem_FlexEntryFetch( Mem_Flex_t * p, int nBytes );
54 extern void Mem_FlexRestart( Mem_Flex_t * p );
55 extern int Mem_FlexReadMemUsage( Mem_Flex_t * p );
56 // hierarchical memory manager
57 extern Mem_Step_t * Mem_StepStart( int nSteps );
58 extern void Mem_StepStop( Mem_Step_t * p, int fVerbose );
59 extern char * Mem_StepEntryFetch( Mem_Step_t * p, int nBytes );
60 extern void Mem_StepEntryRecycle( Mem_Step_t * p, char * pEntry, int nBytes );
61 extern int Mem_StepReadMemUsage( Mem_Step_t * p );
62 
63 
64 
66 
67 
68 
69 #endif
70 
71 ////////////////////////////////////////////////////////////////////////
72 /// END OF FILE ///
73 ////////////////////////////////////////////////////////////////////////
74 
75 
DECLARATIONS ///.
Definition: mem.c:35
static Llb_Mgr_t * p
Definition: llb3Image.c:950
void Mem_FlexStop(Mem_Flex_t *p, int fVerbose)
Definition: mem.c:343
void Mem_StepStop(Mem_Step_t *p, int fVerbose)
Definition: mem.c:510
char * Mem_FixedEntryFetch(Mem_Fixed_t *p)
Definition: mem.c:168
int Mem_FixedReadMemUsage(Mem_Fixed_t *p)
Definition: mem.c:277
void Mem_FixedEntryRecycle(Mem_Fixed_t *p, char *pEntry)
Definition: mem.c:219
int Mem_StepReadMemUsage(Mem_Step_t *p)
Definition: mem.c:593
char * Mem_FlexEntryFetch(Mem_Flex_t *p, int nBytes)
Definition: mem.c:372
#define ABC_NAMESPACE_HEADER_START
NAMESPACES ///.
Definition: abc_global.h:105
typedefABC_NAMESPACE_HEADER_START struct Mem_Fixed_t_ Mem_Fixed_t
DECLARATIONS ///.
Definition: mem.h:33
void Mem_FixedRestart(Mem_Fixed_t *p)
Definition: mem.c:239
Mem_Flex_t * Mem_FlexStart()
Definition: mem.c:311
#define ABC_NAMESPACE_HEADER_END
Definition: abc_global.h:106
Mem_Fixed_t * Mem_FixedStart(int nEntrySize)
FUNCTION DEFINITIONS ///.
Definition: mem.c:100
void Mem_FixedStop(Mem_Fixed_t *p, int fVerbose)
Definition: mem.c:139
void Mem_FlexRestart(Mem_Flex_t *p)
Definition: mem.c:417
int Mem_FixedReadMaxEntriesUsed(Mem_Fixed_t *p)
Definition: mem.c:293
char * Mem_StepEntryFetch(Mem_Step_t *p, int nBytes)
Definition: mem.c:537
int Mem_FlexReadMemUsage(Mem_Flex_t *p)
Definition: mem.c:445
Mem_Step_t * Mem_StepStart(int nSteps)
Definition: mem.c:474
void Mem_StepEntryRecycle(Mem_Step_t *p, char *pEntry, int nBytes)
Definition: mem.c:570