- Extreme C
- Kamran Amini
- 278字
- 2021-03-26 16:15:44
Summary
As part of this chapter, we mainly covered the Stack and Heap segments and the way they should be used. After that, we briefly discussed memory-constrained environments and we saw how techniques like caching and memory pools can increase the performance.
In this chapter:
- We discussed the tools and techniques used for probing both Stack and Heap segments.
- We introduced debuggers and we used
gdb
as our main debugger to troubleshoot memory-related issues. - We discussed memory profilers and we used
valgrind
to find memory issues such as leakages or dangling pointers happening at runtime. - We compared the lifetime of a Stack variable and a Heap block and we explained how we should judge the lifetime of such memory blocks.
- We saw that memory management is automatic regarding Stack variables, but it is fully manual with Heap blocks.
- We went through the common mistakes that happen when dealing with Stack variables.
- We discussed the constrained environments and we saw how memory tuning can be done in these environments.
- We discussed the performant environments and what techniques can be used to gain some performance.
The next four chapters together cover object orientation in C. This might at first glance seem to be unrelated to C, but in fact, this is the correct way to write object-oriented code in C. As part of these chapters, you will be introduced to the proper way of designing and solving a problem in an object-oriented fashion, and you will get guidance through writing readable and correct C code.
The next chapter covers encapsulation and the basics of object-oriented programming by providing the required theoretical discussion and examples to explore the topics discussed.
- Learn ECMAScript(Second Edition)
- Learn TypeScript 3 by Building Web Applications
- 深入理解Android(卷I)
- Learning Cython Programming(Second Edition)
- LabVIEW2018中文版 虛擬儀器程序設計自學手冊
- Rust編程從入門到實戰
- Learning Python Design Patterns(Second Edition)
- JavaScript:Moving to ES2015
- ANSYS Fluent 二次開發指南
- Nagios Core Administration Cookbook(Second Edition)
- Python Web自動化測試設計與實現
- Python+Office:輕松實現Python辦公自動化
- Python機器學習與量化投資
- 實驗編程:PsychoPy從入門到精通
- Python數據科學實踐指南