Sorting source tree a bit
[tpg/acess2.git] / KernelLand / Modules / Interfaces / UDI / include / udi / mem.h
diff --git a/KernelLand/Modules/Interfaces/UDI/include/udi/mem.h b/KernelLand/Modules/Interfaces/UDI/include/udi/mem.h
new file mode 100644 (file)
index 0000000..d29f25e
--- /dev/null
@@ -0,0 +1,38 @@
+/**
+ * \file udi_mem.h
+ */
+#ifndef _UDI_MEM_H_
+#define _UDI_MEM_H_
+
+/**
+ * \brief Callback type for ::udi_mem_alloc
+ */
+typedef void udi_mem_alloc_call_t(udi_cb_t *gcb, void *new_mem);
+
+/**
+ * \brief Allocate memory
+ */
+extern void udi_mem_alloc(
+       udi_mem_alloc_call_t *callback,
+       udi_cb_t        *gcb,
+       udi_size_t      size,
+       udi_ubit8_t     flags
+       );
+
+/**
+ * \brief Values for ::udi_mem_alloc \a flags
+ * \{
+ */
+#define UDI_MEM_NOZERO               (1U<<0)   //!< No need to zero the memory
+#define UDI_MEM_MOVABLE              (1U<<1)   //!< Globally accessable memory?
+/**
+ * \}
+ */
+
+/**
+ * \brief Free allocated memory
+ */
+extern void udi_mem_free(void *target_mem);
+
+
+#endif

UCC git Repository :: git.ucc.asn.au