diff options
Diffstat (limited to 'src/include/memmgr.h')
-rw-r--r-- | src/include/memmgr.h | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/src/include/memmgr.h b/src/include/memmgr.h new file mode 100644 index 0000000..f78395f --- /dev/null +++ b/src/include/memmgr.h @@ -0,0 +1,37 @@ + +/* + * Licensed Materials - Property of IBM + * + * trousers - An open source TCG Software Stack + * + * (C) Copyright International Business Machines Corp. 2004 + * + */ + +#ifndef _MEMMGR_H_ +#define _MEMMGR_H_ + +/* + * For each TSP context, there is one memTable, which holds a list of memEntry's, + * each of which holds a pointer to some malloc'd memory that's been returned to + * the user. The memTable also can point to other memTable's which would be + * created if multiple TSP contexts were opened. + * + */ + +struct memEntry { + void *memPointer; + struct memEntry *nextEntry; +}; + +struct memTable { + TSS_HCONTEXT tspContext; + struct memEntry *entries; + struct memTable *nextTable; +}; + +MUTEX_DECLARE_INIT(memtable_lock); + +struct memTable *SpiMemoryTable = NULL; + +#endif |