4.10
Line | |
---|
1 | /** |
---|
2 | * @file |
---|
3 | * |
---|
4 | * @ingroup ScoreProtHeap |
---|
5 | * |
---|
6 | * @brief Protected Heap Handler implementation. |
---|
7 | */ |
---|
8 | |
---|
9 | /* |
---|
10 | * COPYRIGHT (c) 1989-2007. |
---|
11 | * On-Line Applications Research Corporation (OAR). |
---|
12 | * |
---|
13 | * The license and distribution terms for this file may be |
---|
14 | * found in the file LICENSE in this distribution or at |
---|
15 | * http://www.rtems.com/license/LICENSE. |
---|
16 | * |
---|
17 | * $Id$ |
---|
18 | */ |
---|
19 | |
---|
20 | #if HAVE_CONFIG_H |
---|
21 | #include "config.h" |
---|
22 | #endif |
---|
23 | |
---|
24 | #include <rtems/system.h> |
---|
25 | #include <rtems/score/protectedheap.h> |
---|
26 | |
---|
27 | bool _Protected_heap_Resize_block( |
---|
28 | Heap_Control *the_heap, |
---|
29 | void *starting_address, |
---|
30 | uintptr_t size |
---|
31 | ) |
---|
32 | { |
---|
33 | Heap_Resize_status status; |
---|
34 | uintptr_t old_mem_size; |
---|
35 | uintptr_t avail_mem_size; |
---|
36 | |
---|
37 | _RTEMS_Lock_allocator(); |
---|
38 | status = _Heap_Resize_block( |
---|
39 | the_heap, starting_address, size, &old_mem_size, &avail_mem_size ); |
---|
40 | _RTEMS_Unlock_allocator(); |
---|
41 | return (status == HEAP_RESIZE_SUCCESSFUL); |
---|
42 | } |
---|
43 | |
---|
Note: See
TracBrowser
for help on using the repository browser.