2 ms·
My instincts are that it's in stack memory, not heap, so there won't necessarily be a violation, and as you're not overwriting with anything (or making a new st
by Nursie 13y ago
My instincts are that it's in stack memory, not heap, so there won't necessarily be a violation, and as you're not overwriting with anything (or making a new stack frame), sure the memory's still there and unaltered.
You can write all over your stack if you like. It's a pretty bad idea though.
- GeneralMayhem 13y agoYeah, it looks to me like it should work up until you make another function call. Of course, that's assuming the platonic ideal of a memory model, which may not actually hold after the compiler, linker, loader, and memory paging have all had their way with it.