Systematic Learning of C Language Without Textbooks: Definition and Reference of 2D Arrays

<Definition and Reference of 2D Arrays>From beginner to expert, from Hello World to ACMAll content, no textbooks required! <Lecture> A two-dimensional array is essentially an “array of arrays” that is stored in memory in a row-major order. 1. Concept and Memory Model of 2D Arrays 1.1 What is a 2D Array? A two-dimensional array is … Read more

Understanding Assembly Language: A Comprehensive Guide

Understanding Assembly Language: A Comprehensive Guide

1. What is Assembly Language? The only language that computers can truly understand is low-level language, which is specifically used to control hardware. Assembly language is a low-level language that directly describes and controls the operation of the CPU. If you want to understand what the CPU is doing and the steps of code execution, … Read more

In-Depth Analysis of C++ Syntax and Core Interview Insights

In-Depth Analysis of C++ Syntax and Core Interview Insights

Content from: Programmer Lao Liao https://space.bilibili.com/3494351095204205 Chapter 1: C++ Memory Model and Object Lifecycle 1.1 Memory Segmentation: Stack, Heap, Global/Static Storage Area, Constant Area The memory layout of a C++ program is typically divided into several areas, understanding them is crucial for writing efficient and safe code. Stack Stored Content: Local variables, function parameters, return … Read more

Assembly Language and C: A Closer Look at Low-Level Embedded Development

Assembly Language and C: A Closer Look at Low-Level Embedded Development

This article introduces the C language and assembly language, which are closer to the hardware level, and explains how the CPU executes code. High-Level vs Low-Level Languages Learning to program is essentially learning a language to communicate with computers. Since computers do not understand human languages, a compiler translates the code written by humans into … Read more

Linux Physical Memory Models

Linux Physical Memory Models

In general, the kernel manages physical memory in pages, with each page being 4K in size, described using the struct page structure, which stores various information about the physical page. To quickly index specific physical memory pages, the kernel defines an index number for each physical page struct page: PFN (Page Frame Number), where PFN … Read more

Understanding C++ Memory Model

Understanding C++ Memory Model

↓Recommended to follow↓ This article is a sister piece to “C++ Concurrency Programming”. It will focus on the memory model introduced by the C++11 standard. Introduction In the article “C++ Concurrency Programming”, we have already introduced the new APIs in concurrent programming from C++11 to C++17. With the knowledge from that article, you should be … Read more

Detailed Explanation of C++ Multithreading Memory Model (Memory Order)

Detailed Explanation of C++ Multithreading Memory Model (Memory Order)

In multithreaded programming, there are two issues to pay attention to: one is data races, and the other is memory execution order. What is a data race? First, let’s look at what a data race is and what problems it can cause. #include <iostream> #include <thread> int counter = 0; void increment() { for (int … Read more

Understanding the Significance of the Stack in Embedded Programming

Understanding the Significance of the Stack in Embedded Programming

Follow+Star Public Account, don’t miss out on exciting content Author | Li Xiaoyao Source | Technology Makes Dreams Greater What is a Variable? Variables can generally be subdivided as shown in the figure below: The focus of this section is to help everyone understand the “stack” in the memory model, temporarily disregarding the case of … Read more

How Do Computers Recognize Code? Starting from Assembly Language

How Do Computers Recognize Code? Starting from Assembly Language

▼For more exciting recommendations, please follow us▼ Learning programming is essentially learning high-level languages, which are computer languages designed for humans. However, computers do not understand high-level languages; they must be converted into binary code through a compiler to run. Knowing a high-level language does not equate to understanding the actual execution steps of a … Read more