mirror of
https://github.com/DCC-EX/CommandStation-EX.git
synced 2024-11-26 09:36:13 +01:00
Force inline because we do not want to use stack space for this function even if compiler has other preferences
This commit is contained in:
parent
0373f060fb
commit
6e8929c89e
11
DCCTimer.h
11
DCCTimer.h
|
@ -71,11 +71,12 @@ class DCCTimer {
|
|||
// So even if all of the heap is freed, the reported minimum free
|
||||
// memory will not increase.
|
||||
//
|
||||
static void inline updateMinimumFreeMemoryISR(unsigned char extraBytes=0) {
|
||||
int spare = freeMemory()-extraBytes;
|
||||
if (spare < 0) spare = 0;
|
||||
if (spare < minimum_free_memory) minimum_free_memory = spare;
|
||||
}
|
||||
static void inline updateMinimumFreeMemoryISR(unsigned char extraBytes=0)
|
||||
__attribute__((always_inline)) {
|
||||
int spare = freeMemory()-extraBytes;
|
||||
if (spare < 0) spare = 0;
|
||||
if (spare < minimum_free_memory) minimum_free_memory = spare;
|
||||
};
|
||||
|
||||
static int getMinimumFreeMemory();
|
||||
static void reset();
|
||||
|
|
Loading…
Reference in New Issue
Block a user