What are the unique usages of "##" in C language?
Transferred from: Micro reading https://www.weidianyuedu.com
There are many popular programming languages on the market, such as Python , JAVA, Go, etc. you may think C language is very old and backward. If you have this idea, you may just be a beginner. Before I shared with you the definition and usage of several special standards in C la ...
Added by Tea_J on Tue, 01 Mar 2022 02:01:18 +0200
[linux] allocate physical memory page of linux memory management
linux allocate physical memory page
1, Physical memory allocation overview
In the linux kernel, the page allocator can allocate one or more consecutive physical pages. The number of allocated pages can only be an integer power of 2; Allocating continuous physical pages is more beneficial to alleviate the memory fragmentation of the system ...
Added by PandaFi on Mon, 28 Feb 2022 15:38:16 +0200
Algorithm / sliding window
Sliding windows are divided into two types: unfixed window size and fixed window size: (commonly used when looking for substrings that meet certain requirements)
1) Unfixed window size: the window size will change. When the current window does not meet the requirements, it will move backward as a whole.
2) Fixed window size: the window size i ...
Added by gavin1996 on Mon, 28 Feb 2022 09:30:33 +0200
Memory management experiment
More exchanges, welcome tiktok, 81849645041
objective
Understand internal memory and external memory, and realize the dynamic management of memory.
principle
Memory management refers to the technology of allocating and using computer memory resources when software is running. Its main purpose is how to allocate efficiently and quickly, and ...
Added by GKWelding on Mon, 28 Feb 2022 03:53:48 +0200
linux Basics
1. Signal
Signals are software interrupts that provide a way to handle asynchronous events
The simplest interface of unix signaling mechanism is the signal function
/*
* sign Signal integer
* func Function pointer
* return : Function pointer (a function address, function has an integer parameter, no return value)
*/
void (* signal(int ...
Added by egorig on Sun, 27 Feb 2022 15:38:00 +0200
SD card reading and writing experiment
More exchanges, welcome tiktok, 81849645041
objective
Familiar with the working principle of SD card and SDIO. Master the reading and writing of SD card.
principle
Most single chip microcomputer systems need large capacity storage devices to store data. At present, U disk, FLASH chip, SD card and so on are commonly used. They have their own ...
Added by Zoran_Dimov on Sun, 27 Feb 2022 14:48:24 +0200
Program environment and preprocessing
catalogue
Program translation environment and execution environment
Compilation and linking
Pretreatment
Program translation environment and execution environment
In any implementation of ANSI C, there are two different environments. Translation environment and execution environment.
Translation environment: in this environment, the ...
Added by Negligence on Sat, 26 Feb 2022 21:55:17 +0200
Dynamic memory management
Catalogue
Introduction to dynamic memory function
Common mistakes
Flexible array
Introduction to dynamic memory function
malloc: apply for a continuous space like memory
void* malloc(size_t size);
If the development is successful, return a pointer to the developed space.
If the development fails, a NULL is returned
The return t ...
Added by Goose87 on Sat, 26 Feb 2022 21:51:09 +0200
String + memory function
catalogue
Function introduction
Simulation Implementation of library function
Function introduction
strlen:
The string ends with '\ 0'. The strlen function returns the number of characters (excluding '\ 0') that appear before '\ 0' in the string. The string pointed to by the parameter must end with '\ 0'. Note that the return value o ...
Added by sBForum on Sat, 26 Feb 2022 21:47:43 +0200
[implementation of FTP cloud disk for linux small project]
Implementation of FTP cloud disk for linux small project
preface
In the past two days, I have reviewed the basic knowledge of linux (file IO operation, process, thread, network programming, interprocess communication) I learned before. Well, on the whole, I have a deeper understanding of the knowledge points than I learned for the first ...
Added by prometheos on Sat, 26 Feb 2022 17:00:05 +0200