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
|
System Initiative Releases AI Infrastructure Automation Platform 01/09/2025 System Initiative has released an AI-native infrastructure automation platform. The company says the platform means engineering teams can work directly with AI agents that not only understand every de [ ... ] |
GitHub Adds Copilot Agents Panel 28/08/2025 GitHub has added an agents panel that developers can use to delegate tasks to Copilot from any page on github with a simple prompt. |
More News
|
Comments
or email your comment to: comments@i-programmer.info