Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHenrik Rentz-Reichert2019-05-10 10:21:10 -0400
committerHenrik Rentz-Reichert2019-05-15 13:30:58 -0400
commit5f88a96768e4e8d6336ad5d329d2049bce644b04 (patch)
treecec0bb1753979340c3b54607936bd6628d027749 /runtime/org.eclipse.etrice.runtime.c/src/common/runtime/etRuntime.h
parent877c88575ff8a7665aa78107a2b03d0ce0bbfb07 (diff)
downloadorg.eclipse.etrice-5f88a96768e4e8d6336ad5d329d2049bce644b04.tar.gz
org.eclipse.etrice-5f88a96768e4e8d6336ad5d329d2049bce644b04.tar.xz
org.eclipse.etrice-5f88a96768e4e8d6336ad5d329d2049bce644b04.zip
Bug 546770 - improve and complete memory management
* memory managements hooked into runtime for access to statistics * improved structure and code Change-Id: Id2c0d7d4c77bf5de0753a155d0155738a3195bfe
Diffstat (limited to 'runtime/org.eclipse.etrice.runtime.c/src/common/runtime/etRuntime.h')
-rw-r--r--runtime/org.eclipse.etrice.runtime.c/src/common/runtime/etRuntime.h63
1 files changed, 61 insertions, 2 deletions
diff --git a/runtime/org.eclipse.etrice.runtime.c/src/common/runtime/etRuntime.h b/runtime/org.eclipse.etrice.runtime.c/src/common/runtime/etRuntime.h
index 5c5ff3d0b..4dab21678 100644
--- a/runtime/org.eclipse.etrice.runtime.c/src/common/runtime/etRuntime.h
+++ b/runtime/org.eclipse.etrice.runtime.c/src/common/runtime/etRuntime.h
@@ -18,6 +18,7 @@ extern "C" {
#define _ETRUNTIME_H_
#include "messaging/etMessageService.h"
+#include "base/etMemory.h"
/**
* \file etRuntime.h
@@ -45,6 +46,14 @@ int etRuntime_getMessageServiceCount();
const etMessageServiceStatistics* etRuntime_getMessageServiceStatistics(unsigned int i);
/**
+ * returns the name of a message service
+ *
+ * \param i the message service instance number
+ * \return the name of this message service
+ */
+const char* etRuntime_getMessageServiceName(unsigned int i);
+
+/**
* finds a message service by its name and returns its index or -1 if not found
*
* \param name the name of the message service
@@ -58,16 +67,66 @@ int etRuntime_getMessageServiceByName(const char* name);
void etRuntime_resetAllMessageServiceStatistics();
/**
- * registers the message service by hooking it into a linked list
+ * registers a message service
+ * \param msgService the message service
*/
void etRuntime_registerMessageService(etMessageService* msgService);
/**
- * unregisters the message service by removing it from the linked list
+ * unregisters a message service
+ * \param msgService the message service
*/
void etRuntime_unregisterMessageService(etMessageService* msgService);
/**
+ * registers a memory management
+ * \param mem the memory management
+ */
+void etRuntime_registerMemoryManagement(etMemory* mem);
+
+/**
+ * unregisters a memory management
+ * \param mem the memory management
+ */
+void etRuntime_unregisterMemoryManagement(etMemory* mem);
+
+/**
+ * returns the number of memory managements in this process
+ *
+ * \return the number of memory managements in this process
+ */
+int etRuntime_getMemoryManagementCount();
+
+/**
+ * returns the statistics of a memory management
+ *
+ * \param i the memory management instance number
+ * \return the statistics of this memory management
+ */
+const etMemoryStatistics* etRuntime_getMemoryManagementStatistics(unsigned int i);
+
+/**
+ * finds a memory management by its name and returns its index or -1 if not found
+ *
+ * \param name the name of the memory management
+ * \return the index of the memory management or -1
+ */
+int etRuntime_getMemoryManagementByName(const char* name);
+
+/**
+ * returns the name of a memory management
+ *
+ * \param i the memory management instance number
+ * \return the name of this memory management
+ */
+const char* etRuntime_getMemoryManagementName(unsigned int i);
+
+/**
+ * sets a flag in all memory management structs that tells the memory managements to reset their statistics
+ */
+void etRuntime_resetAllMemoryManagementStatistics();
+
+/**
* a global semaphore used to terminate the application in headless mode
*
* \return the semaphore

Back to the top