We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1d4588a commit a47d6d6Copy full SHA for a47d6d6
src/rp2_common/pico_runtime/runtime.c
@@ -175,9 +175,9 @@ void *_sbrk(int incr) {
175
prev_heap_end = heap_end;
176
char *next_heap_end = heap_end + incr;
177
178
- if (__builtin_expect(next_heap_end >= (&__StackLimit), false)) {
+ if (__builtin_expect(next_heap_end > (&__StackLimit), false)) {
179
#if PICO_USE_OPTIMISTIC_SBRK
180
- if (next_heap_end == &__StackLimit) {
+ if (heap_end == &__StackLimit) {
181
// errno = ENOMEM;
182
return (char *) -1;
183
}
0 commit comments