C++ Memory Management: Write leaner and safer C++ code using proven memory-management techniques (Paperback)
暫譯: C++ 記憶體管理:使用經驗證的記憶體管理技術撰寫更精簡且安全的 C++ 代碼 (平裝本)
Roy, Patrice, Wong, Michael
- 出版商: Packt Publishing
- 出版日期: 2025-03-25
- 售價: $1,550
- 貴賓價: 9.5 折 $1,473
- 語言: 英文
- 頁數: 434
- 裝訂: Quality Paper - also called trade paper
- ISBN: 1805129805
- ISBN-13: 9781805129806
-
相關分類:
C++ 程式語言
立即出貨 (庫存=1)
買這商品的人也買了...
-
$250$225 -
$1,800$1,710 -
$520$390 -
$700Professional Scrum Development with Microsoft Visual Studio 2012 (Paperback)
-
$580$522 -
$450$351 -
$1,460$1,387 -
$474系統分析與設計:敏捷疊代方法(原書第6版)
-
$3,210$3,050 -
$857深度學習
-
$650$507 -
$534JSON 實戰
-
$284大數據技術
-
$398$299 -
$460$391 -
$420$332 -
$599$509 -
$800$624 -
$400$316 -
$780$616 -
$2,185$2,070 -
$2,240$2,128 -
$2,708$2,565 -
$720$562 -
$880$695
相關主題
商品描述
Harness the power of C++ to build smaller, faster, safer, and more predictable programs using the latest techniques and best practices to optimize performance and ensure reliability in your software development projects
Key Features:
- Use contemporary C++ features to enhance code safety and reliability
- Develop a deeper understanding of memory management mechanisms in C++
- Write programs that adapt to the constraints of your chosen architecture or platform
- Purchase of the print or Kindle book includes a free PDF eBook
Book Description:
C++ programmers often face challenges in allocating and managing memory efficiently, especially given the diverse needs of real-time systems, embedded systems, games, and conventional desktop applications. This book offers a targeted approach to address the unique memory constraints of each domain.
Written by an ISO C++ Standards Committee member, Patrice Roy, this guide covers fundamental concepts of object lifetime and memory organization to help you write simpler and safer programs. You'll learn how to control memory allocation mechanisms, create custom containers and allocators, and adapt allocation operators to suit your specific requirements, making your programs smaller, faster, safer, and more predictable.
Starting with core principles of memory management, this book introduces modern facilities that simplify your work and then dives into memory management mechanics, building solutions for specific application needs, and measuring their impact on your program's behavior.
By the end of this book, you'll be able to write secure programs that handle memory optimally for your application domain. You will also have a strong grasp of both high-level abstractions for safer programs and low-level abstractions that allow detailed customization.
What You Will Learn:
- Master the C++ object model to write more efficient and maintainable code
- Automate resource management to reduce manual errors and improve safety
- Customize memory allocation operators to optimize performance for specific applications
- Develop your own smart pointers to manage dynamic memory with greater control
- Adapt allocation behavior to meet the unique needs of different data types
- Create safe and fast containers to ensure optimal data handling in your programs
- Utilize standard allocators to streamline memory management in your containers
Who this book is for:
This book is for programmers who find C++ memory management challenging yet want to master it. It's ideal for those seeking greater control over memory allocation to make their programs smaller, faster, and safer. Whether you're a seasoned C++ developer or transitioning from other languages, you'll gain insights into how C++ can enhance your programming. It's especially valuable if you're working in constrained environments, like embedded systems or game development. Prior experience with programming concepts, such as generic and concurrent programming, is helpful.
Table of Contents
- Objects, Pointers, and References
- Things to Be Careful With
- Casts and cv-qualifications
- Using Destructors
- Using Standard Smart Pointers
- Writing Smart Pointers
- Overloading Memory Allocation Operators
- Writing a Naïve Leak Detector
- Atypical Allocation Mechanisms
- Arena-Based Memory Management and Other Optimizations
- Deferred Reclamation
- Writing Generic Containers with Explicit Memory Management
- Writing Generic Containers with Implicit Memory Management
- Writing Generic Containers with Allocator Support
- Contemporary Issues
- Annexure: Things You Should Know
商品描述(中文翻譯)
利用 C++ 的力量,使用最新技術和最佳實踐來構建更小、更快、更安全且更可預測的程式,以優化性能並確保您軟體開發專案的可靠性
主要特點:
- 使用現代 C++ 特性來增強程式碼的安全性和可靠性
- 深入了解 C++ 中的記憶體管理機制
- 編寫能夠適應您所選架構或平台限制的程式
- 購買印刷版或 Kindle 書籍可獲得免費 PDF 電子書
書籍描述:
C++ 程式設計師經常面臨有效分配和管理記憶體的挑戰,特別是在即時系統、嵌入式系統、遊戲和傳統桌面應用程式的多樣需求下。本書提供針對每個領域獨特記憶體限制的解決方案。
本書由 ISO C++ 標準委員會成員 Patrice Roy 撰寫,涵蓋物件生命週期和記憶體組織的基本概念,幫助您編寫更簡單和更安全的程式。您將學習如何控制記憶體分配機制、創建自定義容器和分配器,並調整分配運算子以滿足您的特定需求,使您的程式更小、更快、更安全且更可預測。
本書從記憶體管理的核心原則開始,介紹簡化您工作的現代工具,然後深入探討記憶體管理機制,為特定應用需求構建解決方案,並測量其對您程式行為的影響。
在本書結束時,您將能夠編寫安全的程式,為您的應用領域最佳化記憶體處理。您還將對安全程式的高階抽象和允許詳細自定義的低階抽象有深入的理解。
您將學到的內容:
- 精通 C++ 物件模型,以編寫更高效和可維護的程式碼
- 自動化資源管理,以減少手動錯誤並提高安全性
- 自定義記憶體分配運算子,以優化特定應用的性能
- 開發自己的智能指針,以更好地控制動態記憶體管理
- 調整分配行為以滿足不同資料類型的獨特需求
- 創建安全且快速的容器,以確保您程式中的最佳資料處理
- 利用標準分配器簡化容器中的記憶體管理
本書適合誰:
本書適合那些覺得 C++ 記憶體管理具有挑戰性但希望掌握它的程式設計師。對於那些希望對記憶體分配有更大控制以使其程式更小、更快和更安全的人來說,這本書是理想的選擇。無論您是經驗豐富的 C++ 開發者還是從其他語言轉型,您都將獲得 C++ 如何增強您的程式設計的見解。如果您在受限環境中工作,例如嵌入式系統或遊戲開發,這本書尤其有價值。對於編程概念(如泛型和併發編程)的先前經驗將會有所幫助。
目錄
- 物件、指針和引用
- 需要小心的事項
- 型別轉換和 cv-資格
- 使用解構函數
- 使用標準智能指針
- 編寫智能指針
- 重載記憶體分配運算子
- 編寫簡單的記憶體洩漏檢測器
- 非典型的分配機制
- 基於區域的記憶體管理和其他優化
- 延遲回收
- 編寫具有明確記憶體管理的泛型容器
- 編寫具有隱式記憶體管理的泛型容器
- 編寫具有分配器支持的泛型容器
- 當前問題
- 附錄:您應該知道的事項