There are three memory allocators in linux: boot memory allocator, partner allocator and slab allocator
After the initialization of the system kernel, the page allocator is used to manage the physical pages. When the page allocator is a partner allocator, the partner allocator is characterized by simple and efficient algor ...
Posted by miligraf on Thu, 03 Feb 2022 04:00:06 +0100
Many people on the Internet ask why copy is necessary_ from_ User, someone answered. For example, baidu:
I think this question needs to be answered from two levels
The first level is why you want to copy, can you not copy?
The second level is why copy is used_ from_ User instead of memcpy directly
Copying is necessary. It doesn' ...
Posted by brmcdani on Tue, 25 Jan 2022 03:15:36 +0100
stay (4) Spare memory model of Linux memory model In, we analyze bootmem_ The upper part of the init function. This time, let's go to the lower part. The lower part mainly focuses on the zone_sizes_init function expansion. Prospect review:bootmem_ The init() function code is as follows:
void __init bootmem_init(void)
Posted by mapostel on Tue, 11 Jan 2022 12:08:30 +0100
The meaning of smart pointer
In C + +, new and delete are the keywords to apply for and destroy heap memory. After applying for heap memory, programmers often forget to delete to release heap memory, which is easy to cause a phenomenon - memory leakage, that is, a piece of heap memory is not released after being applied, so that other programs ...
Posted by shmeeg on Sun, 02 Jan 2022 15:38:44 +0100
Read the fucking source code! -- By Lu XunA picture is worth a thousand words. -- By Golgi
Kernel version: 4.14ARM64 processor, Contex-A53, dual coreTools used: Source Insight 3.5, Visio
This article will analyze watermark. Simply put, when allocating pages using the zoned page frame allocator, the available fr ...
Posted by elacdude on Fri, 31 Dec 2021 07:41:39 +0100
SLUB allocator 4 for Linux memory management [slub page size calculation method]
Today, I tracked the calculation methods of object and page order in SLUB in detail and sorted them out to avoid forgetting later, mainly including:
The calculation method of page order is to apply for kmem_ How many pages should each slab apply for when caching? ...
Posted by adamdyer on Wed, 29 Dec 2021 16:56:23 +0100
This blog post is only for me to summarize and learn the knowledge of dynamic memory allocation in C language. In the summary process, I refer to many blogs.
An array is a collection of a fixed n ...
Posted by CaptainChainsaw on Wed, 29 Dec 2021 04:13:47 +0100
What is memory
Macroscopically, the memory that stores data can be called memory. The memory discussed in this chapter is the memory for the program in program design.
Memory is used to store data, which can be understood as arranged in boxes. Boxes are used to store data, but the boxes themselves have numbers and are continuous. This num ...
Posted by r3drain on Sun, 26 Dec 2021 19:52:19 +0100
In the process of mapping a linear address to a physical address by i386 CPU, if the mapping of the address has been established, but the P(present) flag in the corresponding page table or directory item is found to be zero, then the corresponding physical page is not in memory and thus the memory access cannot be completed. In theory, this sit ...
Posted by Heywood on Mon, 18 Oct 2021 19:11:13 +0200