mirror of
https://github.com/DCC-EX/CommandStation-EX.git
synced 2024-12-27 22:31:24 +01:00
Update freeMemory.cpp
Add explanatory comment.
This commit is contained in:
parent
eb54c78d74
commit
0b3c0bfe9e
@ -49,6 +49,11 @@ static inline int freeMemory() {
|
||||
// Update low ram level. Allow for extra bytes to be specified
|
||||
// by estimation or inspection, that may be used by other
|
||||
// called subroutines. Must be called with interrupts disabled.
|
||||
//
|
||||
// Although __brkval may go up and down as heap memory is allocated
|
||||
// and freed, this function records only the worst case encountered.
|
||||
// So even if all of the heap is freed, the reported minimum free
|
||||
// memory will not increase.
|
||||
//
|
||||
void updateMinimumFreeMemory(unsigned char extraBytes) {
|
||||
int spare = freeMemory()-extraBytes;
|
||||
|
Loading…
Reference in New Issue
Block a user