|
@@ -0,0 +1,36 @@
|
|
|
+/**
|
|
|
+ * \file initialize_allocator.h
|
|
|
+ * \author Ioannis Koutras (joko@microlab.ntua.gr)
|
|
|
+ * \date September, 2011
|
|
|
+ * \brief dmmlib allocator initializator.
|
|
|
+ */
|
|
|
+
|
|
|
+#ifndef INITIALIZE_ALLOCATOR_H
|
|
|
+#define INITIALIZE_ALLOCATOR_H
|
|
|
+
|
|
|
+#include <dmmlib/heap.h>
|
|
|
+#include "dmm_config.h"
|
|
|
+
|
|
|
+#ifdef WITH_MEMORY_SPACE_AWARENESS
|
|
|
+/**
|
|
|
+ * Initialize an allocator.
|
|
|
+ *
|
|
|
+ * \param allocator The address of the allocator./**
|
|
|
+ * \param starting_address The starting addres of the memory space which the
|
|
|
+ * allocator has to handle.
|
|
|
+ * \param size The total size of the memory space which the allocator has to
|
|
|
+ * handle.
|
|
|
+ */
|
|
|
+void initialize_allocator(allocator_t *allocator, void *starting_address,
|
|
|
+ size_t size);
|
|
|
+#else
|
|
|
+/**
|
|
|
+ * Initialize an allocator.
|
|
|
+ *
|
|
|
+ * \param allocator The address of the allocator.
|
|
|
+ */
|
|
|
+void initialize_allocator(allocator_t *allocator);
|
|
|
+#endif /* WITH_MEMORY_SPACE_AWARENESS */
|
|
|
+
|
|
|
+#endif /* INITIALIZE_ALLOCATOR_H */
|
|
|
+
|