??? 05/19/08 13:24 Read: times |
#154903 - heap? Responding to: ???'s previous message |
The heap has nothing to do with volatile. A variable that is marked volatile may not be optimized into registers but shall always get a real address. For global and static variables it will have a statically allocated addess, for local variables and parameters it might just as well be on stack. The only things that end up on the heap are things requested by calls to malloc/calloc/realloc.
Some other properties of volatiles are: * they must be read or written exactly as many times as they appear in the C source. * Multiple volatiles must be accessed and functions called in the order as they appear in the source. Maarten |
Topic | Author | Date |
keyword volatile | 01/01/70 00:00 | |
Opposite! | 01/01/70 00:00 | |
volatile modifier | 01/01/70 00:00 | |
Incorrect | 01/01/70 00:00 | |
incorrect! | 01/01/70 00:00 | |
even more | 01/01/70 00:00 | |
A heap o' trouble | 01/01/70 00:00 | |
the curse of the PC programmers | 01/01/70 00:00 | |
meaning of "volatile" with example | 01/01/70 00:00 | |
example | 01/01/70 00:00 | |
gobbelygook | 01/01/70 00:00 | |
heap? | 01/01/70 00:00 | |
Confused? | 01/01/70 00:00 | |
Google told me... | 01/01/70 00:00 | |
link | 01/01/70 00:00 | |
go through my explanation | 01/01/70 00:00 | |
put simply... | 01/01/70 00:00 | |
thanks | 01/01/70 00:00 | |
answer accepted by interviewer | 01/01/70 00:00 | |
Not entirely | 01/01/70 00:00 | |
not input only | 01/01/70 00:00 | |
That's the kind of thing I'd be looking for...![]() | 01/01/70 00:00 |