summaryrefslogtreecommitdiffstats
path: root/cpukit/libcsupport/include/rtems/malloc.h
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2009-11-11 20:36:44 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2009-11-11 20:36:44 +0000
commit0c116189aa322379431561eef2f4710ebd41fdfc (patch)
tree66e7492513afccc20ab638d31cef65e4fb657f1a /cpukit/libcsupport/include/rtems/malloc.h
parent2009-11-11 Jennifer Averett <jennifer.averett@OARcorp.com> (diff)
downloadrtems-0c116189aa322379431561eef2f4710ebd41fdfc.tar.bz2
2009-11-11 Sebastian Huber <sebastian.huber@embedded-brains.de>
* libcsupport/Makefile.am, libcsupport/include/rtems/malloc.h, libcsupport/src/rtems_malloc.c: New function rtems_malloc().
Diffstat (limited to 'cpukit/libcsupport/include/rtems/malloc.h')
-rw-r--r--cpukit/libcsupport/include/rtems/malloc.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/cpukit/libcsupport/include/rtems/malloc.h b/cpukit/libcsupport/include/rtems/malloc.h
index d3018db73c..bd771d254a 100644
--- a/cpukit/libcsupport/include/rtems/malloc.h
+++ b/cpukit/libcsupport/include/rtems/malloc.h
@@ -149,6 +149,28 @@ int rtems_memalign(
size_t size
);
+/**
+ * @brief Allocates a memory area of size @a size bytes from the heap.
+ *
+ * If the alignment parameter @a alignment is not equal to zero, the allocated
+ * memory area will begin at an address aligned by this value.
+ *
+ * If the boundary parameter @a boundary is not equal to zero, the allocated
+ * memory area will fulfill a boundary constraint. The boundary value
+ * specifies the set of addresses which are aligned by the boundary value. The
+ * interior of the allocated memory area will not contain an element of this
+ * set. The begin or end address of the area may be a member of the set.
+ *
+ * A size value of zero will return a unique address which may be freed with
+ * free().
+ *
+ * The memory allocated by this function can be released with a call to free().
+ *
+ * @return A pointer to the begin of the allocated memory area, or @c NULL if
+ * no memory is available or the parameters are inconsistent.
+ */
+void *rtems_malloc(size_t size, uintptr_t alignment, uintptr_t boundary);
+
#ifdef __cplusplus
}
#endif