Deep C Dives: Static Storage |
Written by Mike James | |||||||
Tuesday, 20 May 2025 | |||||||
Page 3 of 3
Static v HeapIf you know about heap storage, see Dive 12, then you might be thinking that as static is easier to use than heap storage, why not use it in preference. The advantage of static storage is that no pointers are involved in its creation or management. Its disadvantage is that it isn’t possible to manage it at all. Heap storage can be freed and resized whereas static storage is fixed. Using static storage can also add to the size of the program file. Static storage and file-level storage is most easily implemented by being compiled into the program and how efficiently this is encoded in the source file varies, but it is possible that if you declare a 1MByte static array the size of your executable increases by 1MByte. This also increases the time it takes to load your program.
Deep C Dives
|
Python Parallel? Not Quite Python 14 23/07/2025 Python is a wonderful language, but lack of speed is its main drawback. Can the Python community create a fully threaded Python to be proud of? It's a big challenge. |
TIOBE - Two To Rule Them All 16/07/2025 The July Tiobe index is out and it isn't particularly interesting until you notice that it confirms the standard model of programming - code is written in Python and C and everything else is jus [ ... ] |
More News
|
Comments
or email your comment to: comments@i-programmer.info