summaryrefslogtreecommitdiffstats
path: root/cpukit/libcsupport/include/rtems/malloc.h
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2011-02-17 14:17:09 +0000
committerSebastian Huber <sebastian.huber@embedded-brains.de>2011-02-17 14:17:09 +0000
commitddb29e37c9bbb6809809c643b62ab3ad8b151632 (patch)
treee54947cbe31114bedb8223339bdb2e68b773c0ed /cpukit/libcsupport/include/rtems/malloc.h
parent2011-02-17 Till Straumann <strauman@slac.stanford.edu> (diff)
downloadrtems-ddb29e37c9bbb6809809c643b62ab3ad8b151632.tar.bz2
2011-02-17 Sebastian Huber <sebastian.huber@embedded-brains.de>
* libcsupport/src/rtems_heap_extend.c: New file. * libcsupport/Makefile.am: Reflect change from above. * libcsupport/include/rtems/malloc.h: Declare rtems_heap_extend(). * score/include/rtems/score/heap.h: Documentation.
Diffstat (limited to 'cpukit/libcsupport/include/rtems/malloc.h')
-rw-r--r--cpukit/libcsupport/include/rtems/malloc.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/cpukit/libcsupport/include/rtems/malloc.h b/cpukit/libcsupport/include/rtems/malloc.h
index adc32c2a58..af092982f7 100644
--- a/cpukit/libcsupport/include/rtems/malloc.h
+++ b/cpukit/libcsupport/include/rtems/malloc.h
@@ -161,6 +161,24 @@ void *rtems_heap_allocate_aligned_with_boundary(
uintptr_t boundary
);
+/**
+ * @brief Extends the memory available for the heap using the memory area
+ * starting at @a area_begin of size @a area_size bytes.
+ *
+ * There are no alignment requirements. The memory area must be big enough to
+ * contain some maintainance blocks. It must not overlap parts of the current
+ * heap areas. Disconnected subordinate heap areas will lead to used blocks
+ * which cover the gaps. Extending with an inappropriate memory area will
+ * corrupt the heap.
+ *
+ * @retval RTEMS_SUCCESSFUL Successful operation.
+ * @retval RTEMS_INVALID_ADDRESS Invalid memory area.
+ */
+rtems_status_code rtems_heap_extend(
+ void *area_begin,
+ uintptr_t area_size
+);
+
#ifdef __cplusplus
}
#endif