From 872c41d1029f8ba9227061f88d659f94b93e6532 Mon Sep 17 00:00:00 2001 From: Dou Liyang Date: Fri, 13 Jul 2018 14:22:42 +0800 Subject: [PATCH] Update linux-mm-1.md s/new a/ a new --- MM/linux-mm-1.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MM/linux-mm-1.md b/MM/linux-mm-1.md index 2eabc0e..92824d7 100644 --- a/MM/linux-mm-1.md +++ b/MM/linux-mm-1.md @@ -163,7 +163,7 @@ This function takes a physical base address and the size of the memory region as memblock_add_range(&memblock.memory, base, size, MAX_NUMNODES, 0); ``` -function. We pass the memory block type - `memory`, the physical base address and the size of the memory region, the maximum number of nodes which is 1 if `CONFIG_NODES_SHIFT` is not set in the configuration file or `1 << CONFIG_NODES_SHIFT` if it is set, and the flags. The `memblock_add_range` function adds a new memory region to the memory block. It starts by checking the size of the given region and if it is zero it just returns. After this, `memblock_add_range` checks the existence of the memory regions in the `memblock` structure with the given `memblock_type`. If there are no memory regions, we just fill new a `memory_region` with the given values and return (we already saw the implementation of this in the [First touch of the linux kernel memory manager framework](https://0xax.gitbooks.io/linux-insides/content/Initialization/linux-initialization-3.html)). If `memblock_type` is not empty, we start to add a new memory region to the `memblock` with the given `memblock_type`. +function. We pass the memory block type - `memory`, the physical base address and the size of the memory region, the maximum number of nodes which is 1 if `CONFIG_NODES_SHIFT` is not set in the configuration file or `1 << CONFIG_NODES_SHIFT` if it is set, and the flags. The `memblock_add_range` function adds a new memory region to the memory block. It starts by checking the size of the given region and if it is zero it just returns. After this, `memblock_add_range` checks the existence of the memory regions in the `memblock` structure with the given `memblock_type`. If there are no memory regions, we just fill a new `memory_region` with the given values and return (we already saw the implementation of this in the [First touch of the linux kernel memory manager framework](https://0xax.gitbooks.io/linux-insides/content/Initialization/linux-initialization-3.html)). If `memblock_type` is not empty, we start to add a new memory region to the `memblock` with the given `memblock_type`. First of all we get the end of the memory region with the: