-
Notifications
You must be signed in to change notification settings - Fork 3k
Issue 3763: Reduce heap allocation in the GCC linker file #4014
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -50,8 +50,14 @@ ENTRY(Reset_Handler) | |
|
||
__ram_vector_table__ = 1; | ||
|
||
/* Heap 1/4 of ram and stack 1/8 */ | ||
__stack_size__ = 0x1000; | ||
/* With the RTOS in use, this does not affect the main stack size. The size of | ||
* the stack where main runs is determined via the RTOS. */ | ||
__stack_size__ = 0x400; | ||
|
||
/* This is the guaranteed minimum available heap size for an application. When | ||
* uVisor is enabled, this is also the maximum available heap size. The | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. uvisor is not supported for these targets in this patch (most of them) ,and the comment makes reference to it. Shall be removed? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I left this allocation in heap in place just in case we decide to have uvisor on these targets in future. |
||
* HEAP_SIZE value is set by uVisor porters to balance the size of the legacy | ||
* heap and the page heap in uVisor applications. */ | ||
__heap_size__ = 0x2800; | ||
|
||
HEAP_SIZE = DEFINED(__heap_size__) ? __heap_size__ : 0x0400; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe I asked already, just to be certain - this has no affect for mbed 2 apps (no RTOS) ? As its for GCC
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes the mbed 2 tests with GCC work after this change.