Skip to content

correct total RAM size, FreeRam.ino malloc failure #4

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

philj404
Copy link

@philj404 philj404 commented Jun 4, 2021

Two minor changes. I will describe the reasoning in two issues.

If you decide to merge, there is no hurry to create a release. I may have another pull request soon.

I am separating these changes as I expect you would want them, even if you don't want to pull in my other changes.


byte *p = new byte[3000];
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See #6

@@ -136,7 +136,7 @@ extern uint8_t *__bss_end;
/// Print free ram size on serial console.
#define MEMORY_PRINT_FREERAM { Serial.print(F("Free ram:")); Serial.println((int) SP - (int) (__brkval == 0 ? (int)&__heap_start : (int)__brkval)); }
/// Print total SRAM size on serial console.
#define MEMORY_PRINT_TOTALSIZE { Serial.print(F("SRAM size:")); Serial.println((int) RAMEND - (int) &__data_start); }
#define MEMORY_PRINT_TOTALSIZE { Serial.print(F("SRAM size:")); Serial.println(((int) RAMEND + 1 - (int) &__data_start)); }
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See #5

@philj404 philj404 marked this pull request as ready for review June 4, 2021 21:03
This was referenced Jun 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant