Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHenrik Rentz-Reichert2019-05-10 09:05:44 +0000
committerGerrit Code Review @ Eclipse.org2019-05-10 09:05:44 +0000
commit877c88575ff8a7665aa78107a2b03d0ce0bbfb07 (patch)
tree0628b685ab1386a0d4b3eb251db1e1f47c6adaef /runtime/org.eclipse.etrice.runtime.c/src/common/base/etMemory_FixedSize.h
parentf7590cbfbde3879099cd9ee78efc5e0c8c24b7ad (diff)
parent0347fa1887a7042769517eb14b432637680f6b56 (diff)
downloadorg.eclipse.etrice-877c88575ff8a7665aa78107a2b03d0ce0bbfb07.tar.gz
org.eclipse.etrice-877c88575ff8a7665aa78107a2b03d0ce0bbfb07.tar.xz
org.eclipse.etrice-877c88575ff8a7665aa78107a2b03d0ce0bbfb07.zip
Merge "Bug 546770 - improve and complete memory management"
Diffstat (limited to 'runtime/org.eclipse.etrice.runtime.c/src/common/base/etMemory_FixedSize.h')
-rw-r--r--runtime/org.eclipse.etrice.runtime.c/src/common/base/etMemory_FixedSize.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/runtime/org.eclipse.etrice.runtime.c/src/common/base/etMemory_FixedSize.h b/runtime/org.eclipse.etrice.runtime.c/src/common/base/etMemory_FixedSize.h
index 855f3e53f..04558bf7a 100644
--- a/runtime/org.eclipse.etrice.runtime.c/src/common/base/etMemory_FixedSize.h
+++ b/runtime/org.eclipse.etrice.runtime.c/src/common/base/etMemory_FixedSize.h
@@ -23,6 +23,7 @@
#include "base/etMemory.h"
#include "base/etQueue.h"
+#include "osal/etLock.h"
/**
* initializes the heap with a simple block management
@@ -35,4 +36,20 @@
*/
etMemory* etMemory_FixedSize_init(void* heap, etUInt32 size, etUInt16 blockSize);
+/**
+ * supply optional user lock/unlock functions for usage in a multi-threaded environment.
+ * \param mem pointer to the memory management struct
+ * \lock pointer to a user supplied locking struct
+ */
+void etMemory_FixedSize_setUserLock(etMemory* mem, etLock* lock);
+
+/**
+ * determines and returns the free memory of the heap
+ *
+ * \param mem pointer to the heap to be managed
+ *
+ * \return the free memory of the heap
+ */
+etUInt32 etMemory_FixedSize_getFreeHeapMem(etMemory* mem);
+
#endif /* _ETMEMORY_FIXED_SIZE_H_ */

Back to the top