-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmemoryManagement.h
More file actions
39 lines (31 loc) · 1.7 KB
/
memoryManagement.h
File metadata and controls
39 lines (31 loc) · 1.7 KB
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
#ifndef MEMORY_MANAGEMENT_H_
#define MEMORY_MANAGEMENT_H_
/** do not include this header somewhere directly. Always just include graph.h */
struct ListPool* createListPool(unsigned int initNumberOfElements);
void freeListPool(struct ListPool *p);
struct VertexList* getVertexList(struct ListPool* pool);
void wipeVertexList(struct VertexList* e);
void dumpVertexList(struct ListPool* p, struct VertexList* l);
void dumpVertexListRecursively(struct ListPool* p, struct VertexList* e);
void dumpVertexListLinearly(struct ListPool* p, struct VertexList* e);
struct VertexPool* createVertexPool(unsigned int initNumberOfElements);
void freeVertexPool(struct VertexPool* p);
struct Vertex* getVertex(struct VertexPool* p);
void wipeVertex(struct Vertex* v);
void wipeVertexButKeepNumber(struct Vertex* v);
void dumpVertex(struct VertexPool* p, struct Vertex* v);
struct ShallowGraphPool* createShallowGraphPool(unsigned int initNumberOfElements, struct ListPool* lp);
void freeShallowGraphPool(struct ShallowGraphPool *p);
struct ShallowGraph* getShallowGraph(struct ShallowGraphPool *p);
void wipeShallowGraph(struct ShallowGraph* g);
void dumpShallowGraph(struct ShallowGraphPool *p, struct ShallowGraph* g);
void dumpShallowGraphCycle(struct ShallowGraphPool *p, struct ShallowGraph* g);
struct GraphPool* createGraphPool(unsigned int initNumberOfElements, struct VertexPool* vp, struct ListPool* lp);
void freeGraphPool(struct GraphPool* p);
struct Graph* getGraph(struct GraphPool* p);
void wipeGraph(struct Graph* g);
void dumpGraph(struct GraphPool* p, struct Graph *g);
void dumpGraphList(struct GraphPool* gp, struct Graph* g);
/******* stuff ***********************************************/
char* copyString(char* string);
#endif