4.8
Last change
on this file since b72e847b was
e746a88,
checked in by Joel Sherrill <joel.sherrill@…>, on 05/03/07 at 21:33:39
|
2007-05-03 Joel Sherrill <joel@…>
- ChangeLog?, libcsupport/src/malloc.c,
libcsupport/src/mallocfreespace.c, sapi/include/confdefs.h,
score/Makefile.am, score/preinstall.am: malloc never blocks so the
Region Manager is quite heavy for implementing this. This patch
implements the C Program Heap directly in terms of the new Protected
Heap handler. This handler is a direct use of a SuperCore? Heap in
conjunction with the Allocator Mutex used internally by RTEMS. This
saves 3184 bytes on most SPARC test executables.
- score/include/rtems/score/protectedheap.h, score/src/pheapallocate.c,
score/src/pheapallocatealigned.c, score/src/pheapextend.c,
score/src/pheapfree.c, score/src/pheapgetblocksize.c,
score/src/pheapgetfreeinfo.c, score/src/pheapgetinfo.c,
score/src/pheapinit.c, score/src/pheapresizeblock.c,
score/src/pheapwalk.c: New files.
|
-
Property mode set to
100644
|
File size:
745 bytes
|
Line | |
---|
1 | /** |
---|
2 | * COPYRIGHT (c) 1989-2007. |
---|
3 | * On-Line Applications Research Corporation (OAR). |
---|
4 | * |
---|
5 | * The license and distribution terms for this file may be |
---|
6 | * found in the file LICENSE in this distribution or at |
---|
7 | * http://www.rtems.com/license/LICENSE. |
---|
8 | * |
---|
9 | * $Id$ |
---|
10 | */ |
---|
11 | |
---|
12 | #if HAVE_CONFIG_H |
---|
13 | #include "config.h" |
---|
14 | #endif |
---|
15 | |
---|
16 | #include <rtems/system.h> |
---|
17 | #include <rtems/score/protectedheap.h> |
---|
18 | |
---|
19 | boolean _Protected_heap_Extend( |
---|
20 | Heap_Control *the_heap, |
---|
21 | void *starting_address, |
---|
22 | size_t size |
---|
23 | ) |
---|
24 | { |
---|
25 | Heap_Extend_status status; |
---|
26 | uint32_t amount_extended; |
---|
27 | |
---|
28 | _RTEMS_Lock_allocator(); |
---|
29 | status = _Heap_Extend(the_heap, starting_address, size, &amount_extended); |
---|
30 | _RTEMS_Unlock_allocator(); |
---|
31 | return (status == HEAP_EXTEND_SUCCESSFUL); |
---|
32 | } |
---|
33 | |
---|
Note: See
TracBrowser
for help on using the repository browser.