Click here to Skip to main content
15,884,849 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: Things I find buried in the C++ reference Pin
Espen Harlinn14-Mar-21 4:04
professionalEspen Harlinn14-Mar-21 4:04 
GeneralRe: Things I find buried in the C++ reference Pin
honey the codewitch14-Mar-21 6:19
mvahoney the codewitch14-Mar-21 6:19 
GeneralRe: Things I find buried in the C++ reference Pin
Espen Harlinn14-Mar-21 10:38
professionalEspen Harlinn14-Mar-21 10:38 
GeneralRe: Things I find buried in the C++ reference Pin
honey the codewitch14-Mar-21 10:52
mvahoney the codewitch14-Mar-21 10:52 
GeneralRe: Things I find buried in the C++ reference Pin
Espen Harlinn14-Mar-21 12:42
professionalEspen Harlinn14-Mar-21 12:42 
GeneralRe: Things I find buried in the C++ reference Pin
honey the codewitch14-Mar-21 12:54
mvahoney the codewitch14-Mar-21 12:54 
GeneralRe: Things I find buried in the C++ reference Pin
Espen Harlinn15-Mar-21 11:29
professionalEspen Harlinn15-Mar-21 11:29 
GeneralRe: Things I find buried in the C++ reference Pin
honey the codewitch15-Mar-21 11:57
mvahoney the codewitch15-Mar-21 11:57 
I'm writing that article now. =)

I'm not too interested in making the stack smaller on the x64 because I can't think of a great use case for that.

I'm interested in making it smaller on the AMTel AVR 8-bit monsters, the 32-bit Tensilica XTensa LX6 variants, and the ARM Cortex-M line processors because there are a number of issues primarily around the low cost, and low capabilities of these processors. There's usually so little ram (8kB to 320kb depending on the system) that the programs themselves are run off of flash PSRAM which is slow, and so at least on the XTensa it will cache potions of the program in RAM that are called frequently. This is like a much less sophisticated L1 cache system but even more important because flash I/O over an SPI serial bus makes you want to get out and push.

The problem is you only have 320kB to work with (307kB in the wild, I've found after it "boots") and you can't waste it on nonsense. Including stack canaries.

But I also can't have a lot of code around because of the cache issue. I at least need great locality, and the the degree that I'm not sure how exceptions interfere with I am assuming they will negatively impact it. It's more caution in my ignorance than anything, but even if I was more confident, I don't like the extra hidden stuff that exceptions introduce in terms of code flow and stack space, and potentially locality and goddess knows what else (what will throwing an exception from an ISR routine do?!) I'd just as soon write my code so as not to use them.
Real programmers use butterflies

GeneralRe: Things I find buried in the C++ reference Pin
Stuart Dootson15-Mar-21 1:09
professionalStuart Dootson15-Mar-21 1:09 
GeneralRe: Things I find buried in the C++ reference Pin
honey the codewitch15-Mar-21 2:22
mvahoney the codewitch15-Mar-21 2:22 
GeneralRe: Things I find buried in the C++ reference Pin
Stuart Dootson15-Mar-21 3:31
professionalStuart Dootson15-Mar-21 3:31 
GeneralRe: Things I find buried in the C++ reference Pin
honey the codewitch15-Mar-21 3:52
mvahoney the codewitch15-Mar-21 3:52 
GeneralRe: Things I find buried in the C++ reference Pin
James Curran15-Mar-21 4:43
James Curran15-Mar-21 4:43 
GeneralOh no! Pin
Jörgen Andersson12-Mar-21 9:45
professionalJörgen Andersson12-Mar-21 9:45 
GeneralRe: Oh no! Pin
NotTodayYo12-Mar-21 10:09
NotTodayYo12-Mar-21 10:09 
GeneralRe: Oh no! Pin
RickZeeland12-Mar-21 21:04
mveRickZeeland12-Mar-21 21:04 
GeneralExploding Plastic Pin
honey the codewitch12-Mar-21 9:08
mvahoney the codewitch12-Mar-21 9:08 
GeneralRe: Exploding Plastic Pin
OriginalGriff12-Mar-21 11:17
mveOriginalGriff12-Mar-21 11:17 
GeneralThought of the Day Pin
OriginalGriff12-Mar-21 4:44
mveOriginalGriff12-Mar-21 4:44 
GeneralRe: Thought of the Day Pin
W Balboos, GHB12-Mar-21 5:22
W Balboos, GHB12-Mar-21 5:22 
GeneralThis was sent to me today ... Pin
CHill6012-Mar-21 3:29
mveCHill6012-Mar-21 3:29 
GeneralRe: This was sent to me today ... Pin
PIEBALDconsult12-Mar-21 3:32
mvePIEBALDconsult12-Mar-21 3:32 
GeneralRe: This was sent to me today ... Pin
CHill6012-Mar-21 3:33
mveCHill6012-Mar-21 3:33 
GeneralRe: This was sent to me today ... Pin
PIEBALDconsult12-Mar-21 3:42
mvePIEBALDconsult12-Mar-21 3:42 
GeneralSound of the Week Pin
Sander Rossel11-Mar-21 23:36
professionalSander Rossel11-Mar-21 23:36 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.