diff options
author | Igor Pashev <pashev.igor@gmail.com> | 2012-11-25 14:36:20 +0000 |
---|---|---|
committer | Igor Pashev <pashev.igor@gmail.com> | 2012-11-25 14:36:20 +0000 |
commit | c3649a2def02c41d837ae1f79dda729ccb91e677 (patch) | |
tree | bea46dff212fdef977fe9094a70a939e8cc21885 /src/include/memmgr.h | |
download | trousers-upstream/0.3.9.tar.gz |
Imported Upstream version 0.3.9upstream/0.3.9upstream
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 |