Method and system for saving memory management metadata space

By using displacement and base address methods in 64-bit systems, saving memory management metadata space is achieved, solving the problem of large space occupancy of memory management metadata and improving resource utilization.

CN119473927APending Publication Date: 2025-02-18HUNAN ZETIAN ZHIHANG ELECTRONIC TECH CO LTD
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
CN202411511543.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-28
Publication Date
2025-02-18

AI Technical Summary

Technical Problem

In 64-bit systems, memory management metadata takes up a lot of space, resulting in waste of resources and reduced efficiency.

Method used

By shifting 3 bits left on the 32-bit pointer to obtain the free memory address and adding a 64-bit base address to the address, memory allocation and release are realized, reducing the space occupied by metadata.

Benefits of technology

It effectively reduces the space usage of memory management metadata, and achieves halving of memory management space, without affecting system efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119473927A_ABST
    Figure CN119473927A_ABST
Patent Text Reader

Abstract

The invention discloses a method and system for saving a memory management metadata space, and the method comprises the steps: obtaining a first request sent by a user side through memory distribution, and enabling the first request to be used for requesting to distribute an address; according to the first request, obtaining an idle address in a memory page management linked list; performing left displacement on the free address on a 32-bit pointer by 3 bits to obtain a first address; adding a 64-bit base address to the first address to obtain an actual memory address; obtaining a memory allocation address required by the user side according to the actual memory address; memory release: obtaining a second request sent by the user side, wherein the second request is used for requesting to release the address; according to the second request, subtracting the 64-bit base address from the actual address to obtain a second address; moving the second address rightwards by 3 bits to obtain a memory release address required by the user side; and putting the memory release address into the memory page management linked list. By reducing the memory occupied by the linked list pointer domain, the occupied space of memory management is halved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of memory management, and in particular discloses a method and system for saving memory management metadata space. Background Art

[0002] Memory, also known as main memory, is a storage space that can be directly addressed by the CPU and is made of semiconductor devices. The characteristic of memory is fast access speed.

[0003] In the operating system memory management unit, a memory surface is the smallest management unit, and its size is usually 4KB. In order to manage this surface, a Page structure needs to be created. Page stores metadata related to the memory surface. One of the metadata is a doubly linked list node, which contains two pointers: prev and next, pointing to the previous and next pages respectively.

[0004] In a 64-bit system, one pointer is 8 bytes, and two pointers are 16 bytes. If the memory capacity is 4GB, and one page is 4KB, in order to manage this memory, a total of 1048576 (1M) pages are required, and each node in a page occupies 16 bytes, and the nodes in all pages occupy a total of 16MB.

[0005] Therefore, how to save the space occupied by metadata while ensuring normal memory addressing is a technical problem that needs to be solved urgently. Summary of the invention

[0006] The present invention provides a method and system for saving memory management metadata space, aiming to save the space occupied by metadata on the basis of ensuring normal addressing of memory.

[0007] One aspect of the present invention relates to a method for saving memory management metadata space, comprising the following steps:

[0008] Memory allocation: obtain the first request sent by the user end, the first request is used to request the allocation address; according to the first request, obtain the free address in the memory page management linked list; shift the free address 3 bits to the left on the 32-bit pointer to obtain the first address; add the 64-bit base address to the first address to obtain the actual memory address; according to the actual memory address, obtain the memory allocation address required by the user end, wherein the memory allocation address is a 64-bit memory address;

[0009] Memory release: obtain the second request sent by the user end, the second request is used to request the release address; according to the second request, subtract the 64-bit base address from the actual address to obtain the second address; right shift 3 bits on the second address to obtain the memory release address required by the user end; put the memory release address into the memory page management linked list, where the memory release address is a free address.

[0010] Further, according to the first request, the step of obtaining a free address in the memory page management linked list includes:

[0011] Traverse the memory page management list and find the first free page;

[0012] The data address of the data field corresponding to the first PGAE is returned to the upper-level function call, and the flag position in the first Page is marked as used.

[0013] Furthermore, the step of adding a 64-bit base address to the first address to obtain an actual memory address; and obtaining a memory allocation address required by the user end according to the actual memory address includes:

[0014] Add the 64-bit base address after the previous shift to the first address to get the actual memory address;

[0015] After the new or malloc operation is successful, the first address of the successfully allocated memory is returned to the user end. The first address of the memory is the 64-bit address after adding the base to the actual memory address.

[0016] Further, according to the second request, the step of subtracting the 64-bit base address from the actual address to obtain the second address includes:

[0017] Define a PointerHalf type, use a u32 type to save the pointer offset, and pass the pointer base address through the const constant BASE;

[0018] Use the new function to subtract the 64-bit base address from the actual address of the passed object to get the offset address, check whether the offset address can be correctly saved in the u32 type, shift the offset address right by 3 bits to get the second address, and save the second address in value.

[0019] Furthermore, the step of putting the memory release address into the memory page management linked list includes:

[0020] Traverse the memory page management linked list and find the second page with the same address as the second address;

[0021] Mark the corresponding flag position of the second Page as free.

[0022] Another aspect of the present invention relates to a system for saving memory management metadata space, comprising:

[0023] The memory allocation module is used to obtain a first request sent by the user end, the first request is used to request an allocation address; according to the first request, obtain a free address in the memory page management linked list; shift the free address left by 3 bits on the 32-bit pointer to obtain a first address; add a 64-bit base address to the first address to obtain an actual memory address; according to the actual memory address, obtain a memory allocation address required by the user end, wherein the memory allocation address is a 64-bit memory address;

[0024] The memory release module is used to obtain a second request sent by the user end, where the second request is used to request a release address; according to the second request, the actual address is subtracted from the 64-bit base address to obtain the second address; the second address is shifted right by 3 bits to obtain the memory release address required by the user end; the memory release address is placed in a memory page management linked list, where the memory release address is a free address.

[0025] Furthermore, the memory allocation module includes:

[0026] The first traversal unit is used to traverse the memory page management linked list to find the first free page;

[0027] The first marking unit is used to return the data field data address corresponding to the first PGAE to the upper-level function call, and mark the marking position in the first Page as used.

[0028] Furthermore, the memory allocation module includes:

[0029] A first acquisition unit is used for adding the 64-bit base address after the previous shift to the first address to obtain the actual memory address;

[0030] The second acquisition unit is used to return the first address of the successfully allocated memory to the user end after the new or malloc operation is successful. The first address of the memory is a 64-bit address obtained by adding the base to the actual memory address.

[0031] Furthermore, the memory release module includes:

[0032] The definition unit is used to define a PointerHalf type, using a u32 type to save the pointer offset, and the pointer base address is passed through the const constant BASE;

[0033] A storage unit is used to use the new function to obtain an offset address by subtracting the 64-bit base address from the actual address of the passed object, check whether the offset address can be correctly saved in the u32 type, shift the offset address right by 3 bits to obtain a second address, and save the second address in value.

[0034] Furthermore, the memory release module includes:

[0035] The second traversal unit is used to traverse the memory page management linked list to find the second Page that is the same as the second address;

[0036] The second marking unit is used to mark the mark position corresponding to the second Page as free.

[0037] The beneficial effects achieved by the present invention are:

[0038] The present invention provides a method and system for saving memory management metadata space, through memory allocation: obtaining a first request sent by a user end, the first request is used to request an allocation address; according to the first request, obtaining a free address in a memory page management linked list; shifting the free address left by 3 bits on a 32-bit pointer to obtain a first address; adding a 64-bit base address to the first address to obtain an actual memory address; according to the actual memory address, obtaining a memory allocation address required by the user end; memory release: obtaining a second request sent by the user end, the second request is used to request a release address; according to the second request, subtracting the 64-bit base address from the actual address to obtain a second address; right shifting 3 bits on the second address to obtain a memory release address required by the user end; putting the memory release address into a memory page management linked list. The present invention provides a method and system for saving memory management metadata space, which realizes halving the occupied space of memory management by optimizing the memory management Page data structure and reducing the memory occupied by the linked list pointer domain without affecting the system efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] Figure 1 A schematic diagram of a flow chart of an embodiment of a method for saving memory management metadata space according to the present invention;

[0040] Figure 2 This is a simplified schematic diagram of the structure of the present invention. DETAILED DESCRIPTION

[0041] In order to better understand the above technical solution, the above technical solution will be described in detail below in conjunction with the accompanying drawings and specific implementation methods.

[0042] like Figure 1 and Figure 2 As shown, the first embodiment of the present invention proposes a method for saving memory management metadata space, comprising the following steps:

[0043] Step S100, memory allocation: obtain a first request sent by the user end, the first request is used to request an allocation address; according to the first request, obtain a free address in the memory page management linked list; shift the free address left by 3 bits on the 32-bit pointer to obtain a first address; add a 64-bit base address to the first address to obtain an actual memory address; according to the actual memory address, obtain the memory allocation address required by the user end, wherein the memory allocation address is a 64-bit memory address.

[0044] Memory is a computer resource that backend developers need to have a deep understanding of. Reasonable use of memory helps improve the performance and stability of the machine. The maximum addressable range of a 32-bit pointer is 2 to the power of 32 (4GB), but when the memory address of the Page exceeds this range, it cannot be accessed. In a 64-bit system, the pointer must correspond to 8 bytes, that is, the lower 3 bits of the address are always 0. Therefore, bit3-bit34 of a 64-bit address can be saved in a 32-bit pointer, so that the addressable range becomes 2 to the power of 35 (32GB). This 32GB refers to the memory size that can be used to save the Page structure, and its actual manageable memory size is 8TB.

[0045] Since the Page structures are stored one by one in memory and use the memory virtual address, for example, the 16MB memory of 0xffffffc000000000-0xffffffc001000000 stores 1048576 Pages, and the managed memory capacity is 4GB. It is not possible to directly save the address bit3-bit34 of 0xffffffc000000000 into a 32-bit pointer, and a 64-bit base address is required.

[0046] The final address = 64-bit base address + 35-bit offset (bit0-bit2 is always 0), so that it can be addressed arbitrarily in the memory, and the space occupied by metadata is reduced by 50%.

[0047] The user end uses the new or malloc operation to make the first request application. The first request is used to request the allocation of a memory address. Get the 32-bit free address from the linked list. Because data is a 32-bit pointer, the address obtained needs to be shifted left by 3 bits <<3 to get the address of bit3-bit34. The base address is fixed and is the high bit35-bit63. Adding the data address after the previous shift to the base address is the actual memory address. After the new or malloc operation is successful, the first address of the successfully allocated memory is returned to the user, which is the 64-bit address after adding the base above.

[0048] Step S200, memory release: obtain a second request sent by the user end, the second request is used to request a release address; according to the second request, subtract the 64-bit base address from the actual address to obtain a second address; right shift 3 bits on the second address to obtain the memory release address required by the user end; put the memory release address into a memory page management linked list, wherein the memory release address is a free address.

[0049] When the program ends, the memory will be released using the delete or free interface. Subtract the 64-bit base address from the actual address to get the offset address of bit0-bit34. Shift right 3 bits on the bit0-bit34 address >>3 to get the data address of bit3-bit34. Traverse the memory page management linked list, find the page with the same data address above, and set the corresponding flag position to free.

[0050] Further, see Figure 1 and Figure 2 The method for saving memory management metadata space provided in this embodiment, step S100 includes:

[0051] Step S110: traverse the memory page management linked list to find the first free Page.

[0052] Traverse the memory page management linked list, find the free Page, and define the free Page as the first Page.

[0053] Step S120: Return the data field data address corresponding to the first PGAE to the upper-layer function call, and mark the flag position in the first Page as used.

[0054] The data field data address corresponding to the first PGAE is returned to the upper-level function call, and the flag position in the first Page is marked as used.

[0055] Preferably, see Figure 1 and Figure 2 The method for saving memory management metadata space provided in this embodiment, step S100 includes:

[0056] Step S130, add the 64-bit base address after the previous shift to the first address to obtain the actual memory address.

[0057] The base address is fixed and is the high bit 35 to bit 63. The actual memory address is obtained by adding the data address after the previous shift to the base address.

[0058] Step S140: After the new or malloc operation is successful, the first address of the successfully allocated memory is returned to the user end. The first address of the memory is a 64-bit address obtained by adding the base to the actual memory address.

[0059] After a successful new or malloc operation, the first address of the successfully allocated memory is returned to the user, which is the 64-bit address after adding base to the above.

[0060] Further, see Figure 1 and Figure 2 The method for saving memory management metadata space provided in this embodiment, step S200 includes:

[0061] Step S210: define a PointerHalf type, use a u32 type to save the pointer offset, and the pointer base address is passed through the const constant BASE.

[0062] The operation is as follows:

[0063] pub(crate)struct PointerHalf<'a, T, const BASE:usize>

[0064] {

[0065] value:u32,

[0066] marker:PhantomData<&'a mut T>,

[0067] }

[0068] Step S220, use the new function to subtract the 64-bit base address from the actual address of the passed object to obtain the offset address, check whether the offset address can be correctly saved in the u32 type, shift the offset address right by 3 bits to obtain the second address, and save the second address in value.

[0069] The operation is as follows:

[0070] pub(crate)fn new(obj:&mut T)->Self

[0071] {

[0072] let value:usize=(obj as*const_as usize).wrapping_

[0073] sub(BASE);

[0074] let size=core::mem::size_of:: <usize>();

[0075] let bits=size.ilog2()as usize;

[0076] / / Check if the address range is out of bounds

[0077] assert_eq! (value&!(0xffffffff< <bits),0);

[0078] PointerHalf{

[0079] #[allow(clippy::cast_possible_truncation)]

[0080] value:(value>>bits)as u32,

[0081] marker:PhantomData,

[0082] }

[0083] }

[0084] The as_ptr function is used to return the correct object address. Just shift value left by 3 bits and add BASE.

[0085] The operation is as follows:

[0086] pub(crate)const fn as_ptr(&self)->*mut T

[0087] {

[0088] let value:usize=self.value as usize;

[0089] BASE.wrapping_add(value<<3)as*mut T

[0090] }

[0091] Then use PointerHalf to define the ListNodeHalf node.

[0092] The operation is as follows:

[0093] pub struct ListNodeHalf<'a, T, const BASE:usize>

[0094] {

[0095] prev:PointerHalf<'a, ListNodeHalf<'a, T, BASE>, BASE>, next: PointerHalf<'a, ListNodeHalf<'a, T, BASE>, BASE>,

[0096] }

[0097] In actual use, you only need to define a type alias and use the kernel starting virtual address as BASE, then you can embed ListNodeHalf into the Page type.

[0098] The operation is as follows:

[0099] type ListNodeHalf<'a,T>=list_head::ListNodeHalf<'a,T,

[0100] {

[0101] config::Page_OFFSET

[0102] }>;

[0103] pub struct PageBuddy

[0104] {

[0105] list:ListNodeHalf<'static, Page>,

[0106] }

[0107] Preferably, step S200 includes:

[0108] Step S230: traverse the memory page management linked list to find the second Page with the same address as the second address.

[0109] Traverse the memory page management linked list, find the Page with the same address as the above data, and define the Page with the same address as the above data as the second Page.

[0110] Step S240: Mark the flag position corresponding to the second Page as free.

[0111] Just mark the corresponding flag position of the second Page as free.

[0112] The invention relates to a system for saving memory management metadata space, comprising a memory allocation module and a memory release module, wherein the memory allocation module is used to obtain a first request sent by a user end, the first request is used to request an allocation address; according to the first request, a free address is obtained in a memory page management linked list; the free address is shifted left by 3 bits on a 32-bit pointer to obtain a first address; a 64-bit base address is added to the first address to obtain an actual memory address; according to the actual memory address, a memory allocation address required by the user end is obtained, wherein the memory allocation address is a 64-bit memory address; the memory release module is used to obtain a second request sent by the user end, the second request is used to request a release address; according to the second request, the actual address is subtracted from the 64-bit base address to obtain a second address; the second address is shifted right by 3 bits to obtain a memory release address required by the user end; the memory release address is put into the memory page management linked list, wherein the memory release address is a free address.

[0113] In the memory allocation module, the user uses the new or malloc operation to make the first request. The first request is used to request the allocation of a memory address. Get the 32-bit free address from the linked list. Because data is a 32-bit pointer, the address obtained needs to be shifted left by 3 bits to get the address of bit3-bit34. The base address is fixed and is the high bit35-bit63. Adding the data address after the previous shift to the base address is the actual memory address. After the new or malloc operation is successful, the first address of the successfully allocated memory is returned to the user, which is the 64-bit address after adding the base above.

[0114] In the memory release module, when the program ends, the memory will be released using the delete or free interface. Subtract the 64-bit base address from the actual address to get the offset address of bit0-bit34. Shift right 3 bits on the bit0-bit34 address >> 3 to get the data address of bit3-bit34. Traverse the memory page management linked list, find the page with the same data address above, and set the corresponding flag position to free.

[0115] Further, see Figure 1 and Figure 2 The system for saving memory management metadata space provided in this embodiment, the memory allocation module includes a first traversal unit and a first marking unit, wherein the first traversal unit is used to traverse the memory page management linked list to find the idle first Page; the first marking unit is used to return the data field data address corresponding to the first PGAE to the upper-level function call, and at the same time mark the mark position in the first Page as used.

[0116] The first traversal unit traverses the memory page management linked list, finds the free page, and defines the free page as the first page.

[0117] The first marking unit returns the data field data address corresponding to the first PGAE to the upper-level function call, and marks the marking position in the first Page as used.

[0118] Preferably, see Figure 1 and Figure 2 In the system for saving memory management metadata space provided by this embodiment, the memory allocation module includes a first acquisition unit and a second acquisition unit, wherein the first acquisition unit is used to add the 64-bit base address after the previous displacement to the first address to obtain the actual memory address; the second acquisition unit is used to return the first address of the successfully allocated memory to the user end after the new or malloc operation is successful, and the memory first address is the 64-bit address after the actual memory address is added with the base.

[0119] In the first acquisition unit, the base address is fixed and is the high bit 35-bit 63. The actual memory address is obtained by adding the data address after the previous displacement to the base address.

[0120] In the second acquisition unit, after the new or malloc operation is successful, the first address of the successfully allocated memory is returned to the user, that is, the 64-bit address after adding base to the above.

[0121] Further, see Figure 1 and Figure 2 In the system for saving memory management metadata space provided by this embodiment, the memory release module includes a definition unit and a storage unit, wherein the definition unit is used to define a PointerHalf type, use a u32 type to save the pointer offset, and the pointer base address is passed through the const constant BASE; the storage unit is used to use the new function to subtract the 64-bit base address from the actual address of the passed object to obtain the offset address, check whether the offset address can be correctly saved in the u32 type, shift the offset address right by 3 bits to obtain the second address, and save the second address in value.

[0122] Preferably, see Figure 1 and Figure 2 In the system for saving memory management metadata space provided by this embodiment, the memory release module includes a second traversal unit and a second marking unit, wherein the second traversal unit is used to traverse the memory page management linked list to find the second Page that is the same as the second address; the second marking unit is used to mark the flag position corresponding to the second Page as free.

[0123] The second traversal unit traverses the memory page management linked list, finds the Page with the same address as the above data, and defines the Page with the same address as the above data as the second Page.

[0124] The second marking unit may mark the mark position corresponding to the second Page as free.

[0125] Compared with the prior art, the method and system for saving memory management metadata space provided by this embodiment are as follows: memory allocation: obtaining the first request sent by the user end, the first request is used to request the allocation address; according to the first request, obtaining the free address in the memory page management linked list; shifting the free address left by 3 bits on the 32-bit pointer to obtain the first address; adding the 64-bit base address to the first address to obtain the actual memory address; according to the actual memory address, obtaining the memory allocation address required by the user end; memory release: obtaining the second request sent by the user end, the second request is used to request the release address; according to the second request, subtracting the 64-bit base address from the actual address to obtain the second address; right shifting 3 bits on the second address to obtain the memory release address required by the user end; putting the memory release address into the memory page management linked list. The method and system for saving memory management metadata space provided by this embodiment reduce the space occupied by the structure in the memory by changing the pointer type and adjusting the size of the PAGE structure; in the process of memory address conversion, the actual value of the address undergoes multiple conversions; without affecting the system efficiency, the memory management space is reduced by half by optimizing the memory management Page data structure and reducing the memory occupied by the linked list pointer domain.

[0126] Although preferred embodiments of the present invention have been described, additional changes and modifications may be made to these embodiments by those skilled in the art once the basic inventive concepts are known. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present invention. Obviously, those skilled in the art may make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.< / usize>

Claims

1. A method for saving memory management metadata space, characterized in that: The following steps are involved: Memory allocation: obtaining a first request sent by a user end, the first request being used to request address allocation; obtaining a free address in a memory page management linked list according to the first request; Shift the free address left by 3 bits on the 32-bit pointer to obtain a first address; Adding a 64-bit base address to the first address to obtain an actual memory address; obtaining a memory allocation address required by the user end according to the actual memory address, wherein the memory allocation address is a 64-bit memory address; Memory release: obtain a second request sent by the user end, where the second request is used to request a release address; according to the second request, subtract the 64-bit base address from the actual address to obtain a second address; right shift 3 bits on the second address to obtain the memory release address required by the user end; put the memory release address into a memory page management linked list, where the memory release address is a free address.

2. The method for saving memory management metadata space according to claim 1, characterized in that: According to the first request, the step of obtaining a free address in the memory page management linked list includes: Traverse the memory page management linked list to find the first free Page; The data field data address corresponding to the first PGAE is returned to the upper-level function call, and the flag position in the first Page is marked as used.

3. The method for saving memory management metadata space as claimed in claim 2, characterized in that: Add the 64-bit base address to the first address to obtain the actual memory address; The step of obtaining the memory allocation address required by the user terminal according to the actual memory address includes: Add the 64-bit base address after the previous shift to the first address to obtain the actual memory address; After the new or malloc operation is successful, the first address of the successfully allocated memory is returned to the user end. The first address of the memory is a 64-bit address obtained by adding the base to the actual memory address.

4. The method for saving memory management metadata space as claimed in claim 1, characterized in that: According to the second request, the step of subtracting the 64-bit base address from the actual address to obtain the second address comprises: Define a PointerHalf type, use a u32 type to save the pointer offset, and pass the pointer base address through the const constant BASE; Use the new function to subtract the 64-bit base address from the actual address of the passed object to get the offset address, check whether the offset address can be correctly saved in the u32 type, shift the offset address right by 3 bits to get the second address, and save the second address in value.

5. The method for saving memory management metadata space as claimed in claim 4, characterized in that: The step of putting the memory release address into the memory page management linked list comprises: Traverse the memory page management linked list to find the second Page that is the same as the second address; Mark the corresponding flag position of the second Page as free.

6. A system for saving memory management metadata space, characterized in that: include: A memory allocation module, used for acquiring a first request sent by a user terminal, wherein the first request is used for requesting an allocation address; According to the first request, obtaining a free address in a memory page management linked list; Shift the free address left by 3 bits on the 32-bit pointer to obtain a first address; Adding a 64-bit base address to the first address to obtain an actual memory address; obtaining a memory allocation address required by the user end according to the actual memory address, wherein the memory allocation address is a 64-bit memory address; A memory release module is used to obtain a second request sent by a user end, wherein the second request is used to request a release address; according to the second request, the actual address is subtracted from the 64-bit base address to obtain a second address; the second address is shifted right by 3 bits to obtain the memory release address required by the user end; and the memory release address is placed in a memory page management linked list, wherein the memory release address is a free address.

7. The system for saving memory management metadata space as claimed in claim 6, characterized in that: The memory allocation module comprises: A first traversal unit, used for traversing the memory page management linked list to find the first idle Page; The first marking unit is used to return the data field data address corresponding to the first PGAE to the upper-level function call, and mark the marking position in the first Page as used.

8. The system for saving memory management metadata space as claimed in claim 7, characterized in that: The memory allocation module comprises: A first acquisition unit, configured to add the 64-bit base address after the previous shift to the first address to obtain an actual memory address; The second acquisition unit is used to return the successfully allocated memory first address to the user end after the new or malloc operation is successful. The memory first address is a 64-bit address obtained by adding base to the actual memory address.

9. The system for saving memory management metadata space as claimed in claim 6, characterized in that: The memory release module comprises: The definition unit is used to define a PointerHalf type, using a u32 type to save the pointer offset, and the pointer base address is passed through the const constant BASE; A storage unit is used to use the new function to subtract the 64-bit base address from the actual address of the passed object to obtain an offset address, check whether the offset address can be correctly saved in the u32 type, shift the offset address right by 3 bits to obtain a second address, and save the second address in value.

10. The system for saving memory management metadata space as claimed in claim 9, characterized in that: The memory release module comprises: A second traversal unit, used for traversing the memory page management linked list to find a second Page that is the same as the second address; The second marking unit is used to mark the mark position corresponding to the second Page as free.

Citation Information

Patent Citations

  • Extracted-index addressing of byte-addressable memories

    CN101189585A

  • Data storage and transmission method in 64-bit multi-core server

    CN108459969A

  • Control page linked list construction device and electronic equipment

    CN117008843A

  • Memory management method and device, equipment and storage medium

    CN117033002A

  • Method and device for analyzing key information of equipment tree in initial starting stage of operating system

    CN118567726A