<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>change log for rtems (2011-02-17)</title>
</head>
<body text='#000000' bgcolor='#ffffff'>
<a name='cs1'></a>
<table border='0' cellspacing='0' cellpadding='5' width='100%' bgcolor='#eeeeee'>
<tr><td colspan='3' bgcolor='#dddddd'>
<font color='#bb2222'><strong>sh</strong></font>
</td></tr>
<tr><td colspan='3' bgcolor='#dddddd'><pre>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.
</pre></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/ChangeLog.diff?r1=text&tr1=1.2714&r2=text&tr2=1.2715&diff_format=h">M</a></td><td width='1%'>1.2715</td><td width='100%'>cpukit/ChangeLog</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libcsupport/Makefile.am.diff?r1=text&tr1=1.132&r2=text&tr2=1.133&diff_format=h">M</a></td><td width='1%'>1.133</td><td width='100%'>cpukit/libcsupport/Makefile.am</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libcsupport/include/rtems/malloc.h.diff?r1=text&tr1=1.11&r2=text&tr2=1.12&diff_format=h">M</a></td><td width='1%'>1.12</td><td width='100%'>cpukit/libcsupport/include/rtems/malloc.h</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libcsupport/src/rtems_heap_extend.c?rev=1.1&content-type=text/vnd.viewcvs-markup">A</a></td><td width='1%'><font color="#000088">1.1</font></td><td width='100%'><font color="#000088">cpukit/libcsupport/src/rtems_heap_extend.c</font></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/score/include/rtems/score/heap.h.diff?r1=text&tr1=1.44&r2=text&tr2=1.45&diff_format=h">M</a></td><td width='1%'>1.45</td><td width='100%'>cpukit/score/include/rtems/score/heap.h</td></tr>
</table>
<pre>
<font color='#006600'>diff -u rtems/cpukit/ChangeLog:1.2714 rtems/cpukit/ChangeLog:1.2715
--- rtems/cpukit/ChangeLog:1.2714 Wed Feb 16 01:37:35 2011
+++ rtems/cpukit/ChangeLog Thu Feb 17 08:17:08 2011
</font><font color='#997700'>@@ -1,3 +1,10 @@
</font><font color='#000088'>+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.
+
</font> 2011-02-16 Sebastian Huber <sebastian.huber@embedded-brains.de>
* score/src/wkspace.c: Removed NULL pointer check from
<font color='#006600'>diff -u rtems/cpukit/libcsupport/Makefile.am:1.132 rtems/cpukit/libcsupport/Makefile.am:1.133
--- rtems/cpukit/libcsupport/Makefile.am:1.132 Mon Aug 23 02:59:38 2010
+++ rtems/cpukit/libcsupport/Makefile.am Thu Feb 17 08:17:09 2011
</font><font color='#997700'>@@ -98,7 +98,8 @@
</font> src/malloc_report_statistics.c src/malloc_report_statistics_plugin.c \
src/malloc_statistics_helpers.c src/posix_memalign.c \
src/rtems_memalign.c src/malloc_deferred.c src/malloc_sbrk_helpers.c \
<font color='#880000'>- src/malloc_dirtier.c src/malloc_p.h src/rtems_malloc.c
</font><font color='#000088'>+ src/malloc_dirtier.c src/malloc_p.h src/rtems_malloc.c \
+ src/rtems_heap_extend.c
</font>
PASSWORD_GROUP_C_FILES = src/getpwent.c
<font color='#006600'>diff -u rtems/cpukit/libcsupport/include/rtems/malloc.h:1.11 rtems/cpukit/libcsupport/include/rtems/malloc.h:1.12
--- rtems/cpukit/libcsupport/include/rtems/malloc.h:1.11 Wed Jun 30 10:36:48 2010
+++ rtems/cpukit/libcsupport/include/rtems/malloc.h Thu Feb 17 08:17:09 2011
</font><font color='#997700'>@@ -161,6 +161,24 @@
</font> uintptr_t boundary
);
<font color='#000088'>+/**
+ * @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
+);
+
</font> #ifdef __cplusplus
}
#endif
<font color='#006600'>diff -u /dev/null rtems/cpukit/libcsupport/src/rtems_heap_extend.c:1.1
--- /dev/null Thu Feb 17 09:10:33 2011
+++ rtems/cpukit/libcsupport/src/rtems_heap_extend.c Thu Feb 17 08:17:09 2011
</font><font color='#997700'>@@ -0,0 +1,45 @@
</font><font color='#000088'>+/**
+ * @file
+ *
+ * @ingroup libcsupport
+ *
+ * @brief rtems_heap_extend() implementation.
+ */
+
+/*
+ * Copyright (c) 2011 embedded brains GmbH. All rights reserved.
+ *
+ * embedded brains GmbH
+ * Obere Lagerstr. 30
+ * 82178 Puchheim
+ * Germany
+ * <rtems@embedded-brains.de>
+ *
+ * The license and distribution terms for this file may be
+ * found in the file LICENSE in this distribution or at
+ * http://www.rtems.com/license/LICENSE.
+ *
+ * $Id$
+ */
+
+#if HAVE_CONFIG_H
+ #include "config.h"
+#endif
+
+#ifdef RTEMS_NEWLIB
+#include "malloc_p.h"
+
+rtems_status_code rtems_heap_extend(
+ void *area_begin,
+ uintptr_t area_size
+)
+{
+ bool ok = _Protected_heap_Extend(RTEMS_Malloc_Heap, area_begin, area_size);
+
+ if (ok) {
+ return RTEMS_SUCCESSFUL;
+ } else {
+ return RTEMS_INVALID_ADDRESS;
+ }
+}
+#endif /* RTEMS_NEWLIB */
</font>
<font color='#006600'>diff -u rtems/cpukit/score/include/rtems/score/heap.h:1.44 rtems/cpukit/score/include/rtems/score/heap.h:1.45
--- rtems/cpukit/score/include/rtems/score/heap.h:1.44 Wed Aug 25 07:35:52 2010
+++ rtems/cpukit/score/include/rtems/score/heap.h Thu Feb 17 08:17:09 2011
</font><font color='#997700'>@@ -430,15 +430,17 @@
</font> );
/**
<font color='#880000'>- * @brief Extends the memory area of the heap @a heap using the memory area
- * starting at @a area_begin of size @a area_size bytes.
</font><font color='#000088'>+ * @brief Extends the memory available for the heap @a heap using the memory
+ * area starting at @a area_begin of size @a area_size bytes.
</font> *
* The extended space available for allocation will be returned in
* @a amount_extended. This pointer may be @c NULL.
*
<font color='#880000'>- * 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.<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+ * 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.
</font> *
* Returns @c true in case of success, and @c false otherwise.
*/
</pre>
<p> </p>
<p>--<br />
<small>Generated by <a href="http://www.codewiz.org/projects/index.html#loginfo">Deluxe Loginfo</a> 2.122 by Bernardo Innocenti <bernie@develer.com></small></p>
</body>
</html>