Optimizing Microcontroller Memory Usage with Map Files

Optimizing Microcontroller Memory Usage with Map Files

The company asked me to interface a visibility detection instrument with a product from a few years ago. The mainboard uses the STM32L051C6 microcontroller to communicate with the visibility detection instrument via RS485. In theory, this should just involve implementing a serial port data reception processing logic. However, after adding the code and compiling, it … Read more

BitMagic: An Efficient C++ Bit Vector Library

BitMagic: An Efficient C++ Bit Vector Library

BitMagic: An Efficient C++ Bit Vector Library In C++ development, memory efficiency and performance optimization are crucial when handling large-scale data. BitMagic is an open-source library focused on providing efficient bit vector containers and algorithms. It employs various optimization techniques to help developers achieve better performance and lower memory usage in data-intensive applications. Bit Vector … Read more

RTOS Kernel Optimization: Achieve 0.1μs Response Time

RTOS Kernel Optimization: Achieve 0.1μs Response Time

PART.01Performance Kill: Three Major Tricks to Push RTOS Kernel to the Limit1. Interrupt Response: The “Bloody Evolution” from μs to Clock Cycles Traditional Solution: FreeRTOS default interrupt latency ≥5μs (some industrial control devices measured directly up to 8.7μs); Huawei Black Technology: L1 Cache Preloading Mechanism (measured on Hisilicon Hi1812 chip): T_{latency} = T_{int} + \lceil … Read more

Comprehensive Analysis of C++ Data Types: A Deep Guide from Memory Layout to Performance Optimization

Comprehensive Analysis of C++ Data Types: A Deep Guide from Memory Layout to Performance Optimization

C++ is an efficient system-level programming language, and its data type system is the foundation for building complex programs. 1. The Memory Essence of Basic Data Types 1. Memory Layout of Integer Family C++ provides a complete integer system from <span>short</span> to <span>long long</span>, and its memory usage follows the “increasing length” principle: #include <iostream> … Read more

Parsing XML with Matlab

Parsing XML with Matlab

In the fields of research and engineering, XML has become the “universal language” for data exchange and storage due to its clear structure and cross-platform compatibility. How can Matlab, as a mainstream tool, efficiently parse XML data? This article systematically breaks down the core technical paths based on official documentation and engineering practices. 🔄 1. … Read more

In-Depth Analysis of Python Descriptor Protocol: Implementing a Cached @property with 70% Memory Reduction!

In-Depth Analysis of Python Descriptor Protocol: Implementing a Cached @property with 70% Memory Reduction!

In-Depth Analysis of Python Descriptor Protocol: Implementing a Cached @property with 70% Memory Reduction! As a Python developer, you are likely familiar with the <span>@property</span> decorator. It cleverly disguises class methods as properties, making the code both elegant and safe. However, have you ever encountered the issue where complex calculations are repeatedly executed every time … Read more

Memory Optimization in C: Methods to Reduce Memory Usage

Memory Optimization in C: Methods to Reduce Memory Usage

In C programming, memory management is a crucial topic. Effective memory usage not only improves program performance but also avoids potential memory leaks and crashes. This article will introduce several methods to reduce memory usage in C programs, demonstrated with code examples. 1. Use Appropriate Data Types Choosing the right data type is the first … Read more

Detailed Explanation of Grouping Technology in Assembly Language

Detailed Explanation of Grouping Technology in Assembly Language

Concept and Function of Grouping Grouping (Group) is a technique in assembly language that combines multiple logical segments into a single physical segment, addressing the issue of frequently switching segment registers in the 8086/8088 architecture. Through grouping, programmers can treat multiple logical segments as one large physical segment for access, thereby simplifying code writing and … Read more