change log for rtems (2011-02-17)

rtems-vc at rtems.org rtems-vc at rtems.org
Thu Feb 17 15:10:34 UTC 2011


 *sh*:
2011-02-17	Sebastian Huber <sebastian.huber at 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.

M 1.2715  cpukit/ChangeLog
M  1.133  cpukit/libcsupport/Makefile.am
M   1.12  cpukit/libcsupport/include/rtems/malloc.h
A    1.1  cpukit/libcsupport/src/rtems_heap_extend.c
M   1.45  cpukit/score/include/rtems/score/heap.h

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
@@ -1,3 +1,10 @@
+2011-02-17	Sebastian Huber <sebastian.huber at 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.
+
 2011-02-16	Sebastian Huber <sebastian.huber at embedded-brains.de>
 
 	* score/src/wkspace.c: Removed NULL pointer check from

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
@@ -98,7 +98,8 @@
     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 \
-    src/malloc_dirtier.c src/malloc_p.h src/rtems_malloc.c
+    src/malloc_dirtier.c src/malloc_p.h src/rtems_malloc.c \
+    src/rtems_heap_extend.c
 
 PASSWORD_GROUP_C_FILES = src/getpwent.c
 

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
@@ -161,6 +161,24 @@
   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

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
@@ -0,0 +1,45 @@
+/**
+ * @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 at 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 */

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
@@ -430,15 +430,17 @@
 );
 
 /**
- * @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.
+ * @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.
  *
  * The extended space available for allocation will be returned in
  * @a amount_extended.  This pointer may be @c NULL.
  *
- * 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. 
+ * 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.
  *
  * Returns @c true in case of success, and @c false otherwise.
  */



--

Generated by Deluxe Loginfo [http://www.codewiz.org/projects/index.html#loginfo] 2.122 by Bernardo Innocenti <bernie at develer.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/vc/attachments/20110217/0c206b40/attachment-0001.html>


More information about the vc mailing list