-
Course Introduction -
Course outline
one 4.5.1. Where does the memory come from in the program 1 This section first introduces the dependence of program runtime on memory, then analyzes where the memory required by these variables comes from, and then introduces the important memory sources of stack, heap, and data area, and explains the details of stack memory allocation and use. Click "4.5. Array&String&Structure&Community&Enum. txt" [48:02] Start learning two 4.5.2. Where does the memory come from in the program 2 This section explains the characteristics and use of heap memory in detail, writes code to teach you how to use malloc and free functions to obtain and release heap memory, and explains some programming details of heap memory. Click "4.5. Array&String&Structure&Community&Enum. txt" [31:44] Start learning three 4.5.3. Where does the memory come from in the program 3 This section explains the characteristics and use of heap memory in detail, writes code to teach you how to use malloc and free functions to obtain and release heap memory, and explains some programming details of heap memory. Click "4.5. Array&String&Structure&Community&Enum. txt" [32:27] Start learning four 4.5.4. Where does the memory come from in the program 4 This section first introduces the concepts of code segment, data segment, bss segment, and so on, then focuses on the analysis of the relationship between data segment and bss segment and C language programming variables, and finally summarizes the principle and use details of the program to obtain memory through data segment. Click "4.5. Array&String&Structure&Community&Enum. txt" [52:40] Start learning five 4.5.5. String type of C language This section describes the nature of the C language string type, and focuses on explaining the three characteristics of the C language string: pointer pointing to the head, fixed end, and memory connected distribution. Click "4.5. Array&String&Structure&Community&Enum. txt" [31:47] Start learning six 4.5.6. Details of strings and character arrays This section describes strings, character arrays and their various initializers, and then combines the sizeof operator and strlen function to try to make you understand the specific performance of strings and character arrays through code practice. Click "4.5. Array&String&Structure&Community&Enum. txt" [48:28] Start learning seven 4.5.7. Overview of C language structure This section gives an overview of structure, mainly talking about the difference between structure and array, and then uses dot and pointer to access structure members to tell you the principle of structure member access. Click "4.5. Array&String&Structure&Community&Enum. txt" [35:13] Start learning eight 4.5.8. Alignment access of structure 1 This section begins with the explanation of aligned access to structures. It uses several structure examples to explain the rules of aligned access and the sizeof test structure size. Finally, it supplements the explanation of the impact of # prgama and __attribute__ on structure alignment rules. This section is the first of three sections. Click "4.5. Array&String&Structure&Community&Enum. txt" [29:47] Start learning nine 4.5.9. Alignment access of structure 2 This section begins with the explanation of aligned access to structures. It uses several structure examples to explain the rules of aligned access and the sizeof test structure size. Finally, it supplements the explanation of the impact of # prgama and __attribute__ on structure alignment rules. This section is the second of three sections. Click "4.5. Array&String&Structure&Community&Enum. txt" [30:42] Start learning ten 4.5.10. Alignment access of structure 3 This section begins with the explanation of aligned access to structures. It uses several structure examples to explain the rules of aligned access and the sizeof test structure size. Finally, it supplements the explanation of the impact of # prgama and __attribute__ on structure alignment rules. There are three sections in total, and this section is the third section. Click "4.5. Array&String&Structure&Community&Enum. txt" [31:12] Start learning eleven 4.5.11. Offsetof macro and container_of macro This section explains two macros related to structures commonly used in the Linux kernel: offsetof and container_of. These two macros make full use of structures, pointers, data types, memory and other knowledge, and are high-end syntax applications in the C language. Understanding and using these two macros can greatly improve the ability of C language and accumulate knowledge for learning the Linux kernel. Click "4.5. Array&String&Structure&Community&Enum. txt" [54:45] Start learning twelve 4.5.12. Common body union This section first introduces the union, and then focuses on the comparison and analysis of the similarities and differences between union and struct, emphasizing the differences between commons and structures, so that you can understand the essence of commons. Click "4.5. Array&String&Structure&Community&Enum. txt" [31:41] Start learning thirteen 4.5.13. Big and small end mode 1 This section first introduces the concept of big end and small end, and then introduces several common ways to test the big end and small end mode of the machine with code Click "4.5. Array&String&Structure&Community&Enum. txt" [36:33] Start learning fourteen 4.5.14. Big and small end mode 2 This section continues to explain the big and small end, and introduces several small and big end test codes that seem to work but actually do not work. At the same time, the concept of big end and small end used in communication system is introduced. Click "4.5. Array&String&Structure&Community&Enum. txt" [27:27] Start learning fifteen 4.5.15. Enumeration This section describes the enumeration constants in C language. First, it tells you the definition and usage of enumeration constants through examples. Then it explains the similarities and differences between enumeration and macro definitions to tell you when enumeration can be used. Click "4.5. Array&String&Structure&Community&Enum. txt" [42:55] Start learning