WO2015103864A1 - 内存管理的方法及Linux终端 - Google Patents

内存管理的方法及Linux终端 Download PDF

Info

Publication number
WO2015103864A1
WO2015103864A1 PCT/CN2014/082598 CN2014082598W WO2015103864A1 WO 2015103864 A1 WO2015103864 A1 WO 2015103864A1 CN 2014082598 W CN2014082598 W CN 2014082598W WO 2015103864 A1 WO2015103864 A1 WO 2015103864A1
Authority
WO
WIPO (PCT)
Prior art keywords
memory area
memory
image
space
program
Prior art date
Application number
PCT/CN2014/082598
Other languages
English (en)
French (fr)
Inventor
姜国定
Original Assignee
深圳Tcl新技术有限公司
姜国定
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 深圳Tcl新技术有限公司, 姜国定 filed Critical 深圳Tcl新技术有限公司
Publication of WO2015103864A1 publication Critical patent/WO2015103864A1/zh

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5011Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals
    • G06F9/5016Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals the resource being the memory

Definitions

  • the present invention relates to the field of computer technologies, and in particular, to a memory management method and a Linux terminal.
  • Linux operating systems such as computers or smart TVs.
  • the memory hardware circuits of these devices using the Linux operating system basically include CPU, GPU, and two MIUs ((memory Interface unit, storage interface unit) and two random access memories (random access Memory, RAM), as shown in Figure 1, the CPU or GPU accesses the corresponding memory through the bus and the corresponding MIU.
  • MIUs memory Interface unit, storage interface unit
  • RAM random access Memory
  • the main purpose of the present invention is to provide a memory management method and a Linux terminal, which are designed to dynamically allocate memory space for the CPU and the GPU according to the needs of the program operation, thereby improving the performance of the system.
  • the present invention provides a memory management method including the following steps:
  • step S2 is specifically:
  • S21 Determine whether the paging request identifier is a paging request identifier corresponding to a preset image memory area, if yes, go to step S22, otherwise go to step S23; S22, allocate a memory space in the image memory area;
  • the method further includes:
  • the method further includes:
  • the method includes:
  • S02 Map an image dedicated memory area of the Linux terminal into the image memory area, and initialize the image memory area.
  • the CPU memory area includes: a direct access memory area, a normal memory area, and a high-end memory area;
  • the step S24 specifically includes:
  • the image memory area is located between the direct access memory area, the normal memory area and any two memory areas of the high-end memory area.
  • the step of searching for a page block that satisfies the running of the program in the direct access memory area, the normal memory area, and the high-end memory area by using a predetermined algorithm includes:
  • the method includes:
  • the invention also provides a Linux terminal, comprising:
  • An obtaining module configured to acquire a paging request identifier for allocating a memory space for the program after running the program on the Linux terminal;
  • the allocation module is configured to determine whether the paging request identifier is a paging request identifier corresponding to a preset image memory area, and allocate a memory space in the image memory area or the CPU memory area according to the determination result.
  • the distribution module comprises:
  • a determining unit configured to determine whether the paging request identifier is a paging request identifier corresponding to a preset image memory area
  • a first allocation unit configured to allocate a memory space in the image memory area if the paging request identifier corresponding to the preset image memory area is used;
  • the second allocation unit is configured to allocate a memory space in the CPU memory area if it is not a paging request identifier corresponding to the preset image memory area.
  • the allocating module further comprises:
  • a third allocation unit configured to allocate a memory space in the CPU memory area when the memory space allocation in the image memory area fails
  • a fourth allocation unit configured to allocate a memory space in the image memory area when the memory space allocation in the CPU memory area fails.
  • the method further comprises:
  • a setting module configured to set the image memory area in the Linux terminal
  • an initialization module configured to map an image dedicated memory area of the Linux terminal into the image memory area, and initialize the image memory area.
  • the CPU memory area includes: a direct access memory area, a normal memory area, and a high-end memory area; and the third allocation unit includes:
  • the allocation subunit is configured to allocate a memory space in a memory area corresponding to the first found page block that satisfies the running of the program.
  • the image memory area is located between the direct access memory area, the normal memory area and any two memory areas of the high-end memory area.
  • the lookup subunit is specifically configured to:
  • the allocating module further includes a fifth allocating unit, configured to trigger a memory overflow mechanism of the Linux terminal to release a memory space when the memory space allocation fails in the image memory area, and again The image memory area allocates memory space for the program.
  • a fifth allocating unit configured to trigger a memory overflow mechanism of the Linux terminal to release a memory space when the memory space allocation fails in the image memory area, and again The image memory area allocates memory space for the program.
  • the method for memory management and the Linux terminal according to the present invention first allocate a memory space for the program in the memory area corresponding to the paging request identifier, that is, a paging request identifier corresponding to the image memory area.
  • the memory space can be allocated in the CPU memory area; when it is not the paging request identifier corresponding to the image memory area, the memory space is allocated in the CPU memory area first, and the allocation is performed. In the case of failure, the memory space can be allocated in the image memory area.
  • the present invention dynamically allocates memory space for the CPU and the GPU according to the needs of the program operation under the premise of ensuring the concurrent access speed, and can cancel the GPU dedicated in the prior art.
  • the memory limit is sufficient and efficient to use all memory spaces. Under the same memory configuration, the system performance of this embodiment is superior.
  • FIG. 1 is a circuit diagram of a memory of a CPU and a GPU in the prior art
  • FIG. 2 is a schematic flow chart of a first embodiment of a method for memory management of the present invention
  • FIG. 3 is a schematic flow chart of a second embodiment of a method for memory management according to the present invention.
  • FIG. 4 is a schematic flow chart of an embodiment of allocating memory space in an image memory area or a CPU memory area shown in FIG. 3;
  • FIG. 5 is a schematic flow chart of another embodiment of allocating a memory space in an image memory area or a CPU memory area shown in FIG. 3;
  • FIG. 6 is a flow chart showing an embodiment of allocating a memory space in a CPU memory area when the memory space allocation in the image memory area fails in FIG. 5;
  • FIG. 7 is a schematic structural diagram of a first embodiment of a Linux terminal according to the present invention.
  • FIG. 8 is a schematic structural diagram of a second embodiment of a Linux terminal according to the present invention.
  • FIG. 9 is a schematic structural view of an embodiment of the distribution module shown in FIG. 8;
  • Figure 10 is a schematic structural view of another embodiment of the distribution module shown in Figure 8.
  • Figure 11 is a schematic view showing the structure of the third dispensing unit shown in Figure 10.
  • an embodiment of the present invention provides a method for memory management, including:
  • Step S1 After running the program on the Linux terminal, obtain a paging request identifier for allocating a memory space for the program;
  • the Linux terminal can be a computer or a smart TV.
  • a smart TV is taken as an example for description.
  • the paging request identifier corresponds to a memory area allocated for the program.
  • ZONE_DMA Direct on Linux terminal
  • Memory Access direct access memory area
  • ZONE_NORMAL normal memory area
  • ZONE_HIGHMEM high-end memory area
  • each memory area corresponds to a paging request identifier, for example, if the paging request identifier is GFG_ NORMAL, allocates memory space for the program in the normal memory area.
  • Step S2 determining whether the paging request identifier is a paging request identifier corresponding to a preset image memory area, and allocating a memory space in the image memory area or the CPU memory area according to the determination result.
  • an image memory area is further preset, and the image memory area may be located between any two memory areas of the three memory areas, for example, between the direct access memory area and the normal memory area.
  • the first direct access memory area, the normal memory area, and the upper memory area are defined as CPU memory areas.
  • the paging request identifier After the paging request identifier is obtained, it is first determined whether the paging request identifier is a paging request identifier corresponding to the image memory area, that is, whether it is a GFG_GPU, and the memory space is allocated in the image memory area or the CPU memory area according to the determination result.
  • the memory space is preferentially allocated in the image memory area, and when the memory space is allocated in the image memory area, the memory space can be allocated in the CPU memory area; for the same reason, If it is determined that the paging request identifier corresponding to the CPU memory area is allocated, the memory space is allocated in the CPU memory area first, and when the memory space is allocated in the CPU memory area, the memory space can be allocated in the image memory area.
  • a memory space is allocated for the program in the memory area corresponding to the paging request identifier, that is, when the paging request identifier corresponding to the image memory area is used, the memory space is preferentially allocated in the image memory area.
  • the allocation fails, the memory space can be allocated in the CPU memory area; when it is not the paging request identifier corresponding to the image memory area, the memory space is preferentially allocated in the CPU memory area, and when the allocation fails, the memory can be allocated in the image memory area.
  • step S01 and step S02 are further included before step S1. ,among them:
  • Step S01 setting the image memory area in the Linux terminal
  • Step S02 mapping an image dedicated memory area of the Linux terminal into the image memory area, and initializing the image memory area.
  • the image memory area of this embodiment may be located between any two memory areas in the CPU memory area.
  • Setting the image memory area includes modifying the initialization function, the memory allocation function, the memory release function, and adding the GFP_GPU paging request identifier.
  • modifying the initialization function is mainly to modify the arm_bootmem_free function in the init.c file.
  • Modifying the memory allocation function mainly modifies the alloc_pages_nodemask function and related functions in the page_alloc.c file.
  • mapping the image-specific memory area of the Linux terminal to the image memory area allows all memory to be managed by the operating system kernel.
  • the process of initializing the image memory area is performed, that is, the start address, the end address, and the size of the image memory area of the image memory area are obtained, and the free page of the image memory area is divided into corresponding page blocks,
  • the page table is initialized corresponding to the image memory area.
  • the step of allocating memory space in the image memory area or the CPU memory area in the above step S2 includes:
  • Step S21 determining whether the paging request identifier is a paging request identifier corresponding to a preset image memory area, and if yes, proceeding to step S22, otherwise proceeding to step S23;
  • Step S22 allocating a memory space in the image memory area
  • Step S23 allocating a memory space in the CPU memory area.
  • the step of the step S2 of allocating a memory space in the image memory area or the CPU memory area may further include:
  • Step S21 determining whether the paging request identifier is a paging request identifier corresponding to a preset image memory area, and if yes, proceeding to step S22, otherwise proceeding to step S23;
  • Step S22 the memory space is allocated in the image memory area, if the allocation is successful, the process ends, if the allocation fails, the process proceeds to step S24;
  • Step S23 the memory space is allocated in the CPU memory area, if the allocation is successful, the process ends, if the allocation fails, the process proceeds to step S25;
  • Step S24 when the memory space allocation in the image memory area fails, the memory space is allocated in the CPU memory area;
  • Step S25 when the allocation of the memory space in the CPU memory area fails, the memory space is allocated in the image memory area;
  • Step S26 When the memory space allocation in the image memory area fails, the memory overflow mechanism of the Linux terminal is triggered to release the memory space, and the memory space is allocated to the program in the image memory area again.
  • the paging request identifier is the paging request identifier corresponding to the image memory area, it is determined that the memory space is allocated in the image memory area, when the memory space allocation in the image memory area fails, that is, when there is not enough remaining memory space in the image memory area, Find the memory area that satisfies the condition in the direct access memory area, the normal memory area, and the upper memory area in the default order of the operating system kernel.
  • the image memory area preset in this embodiment is preferentially used by the GPU, but is not exclusively used by the GPU, for example, when there are more complicated rendering tasks, the preset image memory.
  • the area may be unable to meet the condition because the memory space is too small. In this case, you can find the memory area that meets the conditions in the default order in the CPU memory area that is used by the CPU. This prevents the interface from displaying abnormalities and ensures the normal operation of the Linux terminal.
  • the paging request identifier is not the paging request identifier corresponding to the image memory area, it is determined that the memory space is allocated in the direct access memory area, the normal memory area or the high-end memory area, when directly accessing the memory area, the normal memory area or the high-end memory area.
  • the allocation of memory space fails, that is, when there is not enough free memory space in the three memory areas, the memory space can be allocated in the image memory area.
  • the difference between the present embodiment and the prior art is that the CPU memory area of the embodiment is preferentially used by the CPU, but when there are more applications running, the CPU memory area may not meet the condition due to the memory space being too small. Memory space can be allocated in the image memory area that is preferentially used by the GPU.
  • the memory overflow mechanism of the Linux terminal is triggered (Out Of Memory, OOM) release memory space, such as forcibly closing some less frequently used programs to increase the amount of memory available for allocation, and try to allocate memory space for the current program again.
  • OOM Out Of Memory
  • the memory space is allocated in the memory area where the paging request identifier does not correspond, if the memory space still fails, the memory overflow mechanism is triggered to release the memory space, and the memory is allocated again for the current program. space.
  • step S24 allocates a memory space in the CPU memory area, including:
  • Step S241 searching for a page block that satisfies the running of the program in a direct access memory area, a normal memory area, and a high-end memory area by using a predetermined algorithm;
  • Step S242 allocating a memory space in a memory area corresponding to the first searched page block that satisfies the running of the program.
  • a mate algorithm when allocating memory space in the CPU memory area, it is preferred to use a mate algorithm to search for a page block in the CPU memory area that satisfies the running of the program, specifically searching for a list of page blocks that are close to the memory size required by the program, and searching for a presence or not The page block of this size, if any, is directly allocated; if not, it is searched in a larger list of page blocks.
  • the allocation of memory space in the image memory area also uses a partner algorithm.
  • an embodiment of the present invention provides a Linux terminal, including:
  • the obtaining module 101 is configured to acquire, after running the program on the Linux terminal, a paging request identifier that allocates a memory space for the program;
  • the Linux terminal can be a computer or a smart TV.
  • a smart TV is taken as an example for description.
  • the paging request identifier corresponds to a memory area allocated for the program.
  • ZONE_DMA Direct Memory
  • Access direct access to the memory area
  • ZONE_NORMAL normal memory area
  • ZONE_HIGHMEM high-end memory area
  • each memory area corresponds to a paging request identifier, for example, if the paging request identifier is GFG_ NORMAL, allocates memory space for the program in the normal memory area.
  • the allocating module 102 is configured to determine whether the paging request identifier is a paging request identifier corresponding to a preset image memory area, and allocate a memory space in the image memory area or the CPU memory area according to the determination result.
  • an image memory area is further preset, and the image memory area may be located between any two memory areas of the three memory areas, for example, between the direct access memory area and the normal memory area.
  • the first direct access memory area, the normal memory area, and the upper memory area are defined as CPU memory areas.
  • the allocation module 102 determines whether the paging request identifier is a paging request identifier corresponding to the image memory area, that is, whether it is a GFG_GPU, and allocates a memory space in the image memory area or the CPU memory area according to the determination result.
  • the allocation module 102 of the embodiment determines that the paging request identifier corresponding to the image memory area is allocated, the memory space is preferentially allocated in the image memory area, and when the memory space is allocated in the image memory area, the memory space can be allocated in the CPU memory area; Similarly, if it is determined that the paging request identifier corresponding to the CPU memory area is allocated, the memory space is allocated in the CPU memory area first, and when the memory space is allocated in the CPU memory area, the memory space can be allocated in the image memory area.
  • another embodiment of the present invention provides a Linux terminal. Based on the foregoing embodiment of FIG. 7, the method further includes:
  • the initialization module 100 is configured to map an image dedicated memory area of the Linux terminal into the image memory area, and initialize the image memory area.
  • the image memory area of this embodiment may be located between any two memory areas in the CPU memory area, and the setting module 099 sets the image memory area including modifying the initialization function, the memory allocation function, the memory release function, and adding the GFP_GPU paging request identifier.
  • modifying the initialization function is mainly to modify the arm_bootmem_free function in the init.c file.
  • Modifying the memory allocation function mainly modifies the alloc_pages_nodemask function and related functions in the page_alloc.c file.
  • the initialization module 100 maps the image-specific memory area of the Linux terminal into the image memory area such that all memory is managed by the operating system kernel.
  • the initialization module 100 initializes the image memory area, that is, obtains the start address, the end address, and the size of the image memory area of the image memory area, and divides the free page of the image memory area into corresponding page blocks. Initialize the page table corresponding to the image memory area.
  • the distribution module 102 includes:
  • the determining unit 1021 is configured to determine whether the paging request identifier is a paging request identifier corresponding to a preset image memory area;
  • the first allocating unit 1022 is configured to allocate a memory space in the image memory area if the paging request identifier corresponding to the preset image memory area is used;
  • the second allocating unit 1023 is configured to allocate a memory space in the CPU memory area if it is not a paging request identifier corresponding to the preset image memory area.
  • the distribution module further includes:
  • a third allocating unit 1024 configured to allocate a memory space in the CPU memory area when a memory space allocation in the image memory area fails;
  • a fourth allocating unit 1025 configured to allocate a memory space in the image memory area when the memory space is allocated in the CPU memory area fails;
  • the fifth allocating unit 1026 is configured to trigger a memory overflow mechanism of the Linux terminal to release the memory space when the memory space is allocated in the image memory area fails, and allocate the program space in the image memory area again. Memory space.
  • the paging request identifier is the paging request identifier corresponding to the image memory area, it is determined that the memory space is allocated in the image memory area, when the memory space allocation in the image memory area fails, that is, when there is not enough remaining memory space in the image memory area, Find the memory area that satisfies the condition in the direct access memory area, the normal memory area, and the upper memory area in the default order of the operating system kernel.
  • the image memory area preset in this embodiment is preferentially used by the GPU, but is not exclusively used by the GPU, for example, when there are more complicated rendering tasks, the preset image memory.
  • the area may be unable to meet the condition because the memory space is too small. In this case, you can find the memory area that meets the conditions in the default order in the CPU memory area that is used by the CPU. This prevents the interface from displaying abnormalities and ensures the normal operation of the Linux terminal.
  • the paging request identifier is not the paging request identifier corresponding to the image memory area, it is determined that the memory space is allocated in the direct access memory area, the normal memory area or the high-end memory area, when directly accessing the memory area, the normal memory area or the high-end memory area.
  • the allocation of memory space fails, that is, when there is not enough free memory space in the three memory areas, the memory space can be allocated in the image memory area.
  • the difference between the present embodiment and the prior art is that the CPU memory area of the embodiment is preferentially used by the CPU, but when there are more applications running, the CPU memory area may not meet the condition due to the memory space being too small. Memory space can be allocated in the image memory area that is preferentially used by the GPU.
  • the memory overflow mechanism of the Linux terminal is triggered (Out Of Memory, OOM) release memory space, such as forcibly closing some programs that are not commonly used to increase the allocateable memory space, and try to allocate memory space for the current program again.
  • OOM Out Of Memory
  • the memory space is allocated in the memory area where the paging request identifier does not correspond, if the memory space still fails, the memory overflow mechanism is triggered to release the memory space, and the memory is allocated again for the current program. space.
  • the third allocating unit 1024 includes:
  • the searching subunit 10241 is configured to search for a page block that satisfies the running of the program in a direct access memory area, a normal memory area, and a high-end memory area by using a predetermined algorithm;
  • the allocation subunit 1042 is configured to allocate a memory space in a memory area corresponding to the first searched page block that satisfies the running of the program.
  • the lookup subunit 10241 when the memory space is allocated in the CPU memory area, the lookup subunit 10241 preferably uses a buddy algorithm to search for a page block in the CPU memory area that satisfies the running of the program, specifically, in a linked list of page blocks that are similar in size to the memory required by the program. , to find out whether there is a page block of this size, if there is, then directly allocate; if not, look in the larger list of page blocks.
  • the allocation of memory space in the image memory area also uses a partner algorithm.
  • the method for the memory management and the Linux terminal of the present invention first allocate a memory space for the program in the memory area corresponding to the paging request identifier, that is, when the paging request identifier corresponding to the image memory area is used, Priority is allocated to the memory space in the image memory area.
  • the memory space can be allocated in the CPU memory area; when it is not the paging request identifier corresponding to the image memory area, the memory space is allocated in the CPU memory area preferentially, when the allocation fails.
  • the memory space can be allocated in the image memory area; if the memory space is allocated in the second memory space, that is, in the memory area where the paging request identifier does not correspond, if the memory space still fails, the memory overflow mechanism is triggered to release the memory space. And try again to allocate memory space for the current program.
  • the invention can dynamically allocate memory space for the CPU and the GPU according to the needs of the program running under the premise of ensuring the concurrent access speed, and can cancel the GPU dedicated memory in the prior art. Limit, use all memory space fully and efficiently, within the same Under configuration, the superior performance of the present invention.

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Memory System Of A Hierarchy Structure (AREA)
  • Stored Programmes (AREA)

Abstract

一种内存管理的方法及Linux终端,内存管理的方法包括以下步骤:当在Linux终端上运行程序后,获取为所述程序分配内存空间的分页请求标识;判断所述分页请求标识是否为预设的图像内存区域对应的分页请求标识,根据判断结果在图像内存区域或CPU内存区域分配内存空间。能够根据程序运行的需要,动态地为CPU及GPU分配内存空间,提高系统的性能。

Description

内存管理的方法及Linux终端
技术领域
本发明涉及计算机技术领域,尤其涉及一种内存管理的方法及Linux终端。
背景技术
目前很多Android设备采用Linux操作系统,如计算机或者智能电视等。这些采用Linux操作系统的设备的内存硬件电路基本上都包括CPU、GPU、两个MIU((memory interface unit,存储接口单元)及两个随机存储器(random access memory,RAM),如图1所示,CPU或GPU分别通过总线及对应的MIU访问对应的内存。
在内存管理中,由于CPU相比GPU使用的内存空间要多很多,因此通常在上述的RAM1部分划分出一块内存区域,以供GPU专用,而剩余部分内存由操作系统内核统一管理,并供运行于CPU上的程序使用。这种方法的优点是:内存管理比较简单,系统并发内存访问速度也比较快。
但是,由于上述RAM1是固定划分出来的,在实际使用中具有一定的限制,例如当有较多复杂的渲染任务时,GPU需要的内存空间过大而无法满足,这时将导致渲染不能顺利进行,用户界面显示异常;而此时正在运行的应用可能比较少,系统内存有很多剩余,却无法使用;再如当有较多应用程序在运行时,CPU 需要的内存空间较大,由于系统内存的使用限制,将导致一些应用程序无法运行或者被强行关闭;而此时GPU专用内存可能还有剩余,却无法使用。
发明内容
本发明的主要目的在于提供一种内存管理的方法及Linux终端,旨在根据程序运行的需要,动态地为CPU及GPU分配内存空间,提高系统的性能。
为了达到上述目的,本发明提出一种内存管理的方法,包括以下步骤:
S1、当在Linux终端上运行程序后,获取为所述程序分配内存空间的分页请求标识;
S2、判断所述分页请求标识是否为预设的图像内存区域对应的分页请求标识,根据判断结果在图像内存区域或CPU内存区域分配内存空间。
优选地,所述步骤S2具体为:
S21、判断所述分页请求标识是否为预设的图像内存区域对应的分页请求标识,若是则转到步骤S22,否则转到步骤S23;S22、在所述图像内存区域中分配内存空间;
S23、在所述CPU内存区域分配内存空间。
优选地,所述步骤S22后还包括:
S24、当在所述图像内存区域中分配内存空间失败时,在所述CPU内存区域中分配内存空间;
所述步骤S23之后还包括:
S25、当在所述CPU内存区域中分配内存空间失败时,在所述图像内存区域中分配内存空间。
优选地,所述步骤S1之前包括:
S01、在所述Linux终端中设置所述图像内存区域;
S02、将所述Linux终端的图像专用内存区域映射到所述图像内存区域中,并初始化所述图像内存区域。
优选地,所述CPU内存区域包括:直接存取内存区域、普通内存区域及高端内存区域;
所述步骤S24具体包括:
S241、采用预定算法在所述直接存取内存区域、普通内存区域及高端内存区域中查找满足所述程序运行的页面块;
S242、在首先查找到的满足所述程序运行的页面块对应的内存区域中分配内存空间。
优选地,所述图像内存区域位于所述直接存取内存区域、普通内存区域及高端内存区域的任意两个内存区域之间。
优选地,所述采用预定算法在所述直接存取内存区域、普通内存区域及高端内存区域中查找满足所述程序运行的页面块的步骤包括:
采用伙伴算法在所述直接存取内存区域、普通内存区域及高端内存区域中与程序所需内存大小相近的页面块的链表中查找;
若没有查找到与程序所需内存大小相近的页面块,则在页面块更大的链表中查找。
优选地,所述步骤S25之后包括:
S26、当在所述图像内存区域中分配内存空间失败时,触发所述Linux终端的内存溢出机制进行内存空间的释放,并再次在所述图像内存区域为所述程序分配内存空间。
本发明还提供一种Linux终端,包括:
获取模块,用于当在Linux终端上运行程序后,获取为所述程序分配内存空间的分页请求标识;
分配模块,用于判断所述分页请求标识是否为预设的图像内存区域对应的分页请求标识,根据判断结果在图像内存区域或CPU内存区域分配内存空间。
优选地,所述分配模块包括:
判断单元,用于判断所述分页请求标识是否为预设的图像内存区域对应的分页请求标识;
第一分配单元,用于若是预设的图像内存区域对应的分页请求标识,在所述图像内存区域中分配内存空间;
第二分配单元,用于若不是预设的图像内存区域对应的分页请求标识,在所述CPU内存区域分配内存空间。
优选地,所述分配模块还包括:
第三分配单元,用于当在所述图像内存区域中分配内存空间失败时,在所述CPU内存区域中分配内存空间;
第四分配单元,用于当在所述CPU内存区域中分配内存空间失败时,在所述图像内存区域中分配内存空间。
优选地,还包括:
设置模块,用于在所述Linux终端中设置所述图像内存区域;
初始化模块,用于将所述Linux终端的图像专用内存区域映射到所述图像内存区域中,并初始化所述图像内存区域。
优选地,所述CPU内存区域包括:直接存取内存区域、普通内存区域及高端内存区域;所述第三分配单元包括:
查找子单元,用于采用预定算法在直接存取内存区域、普通内存区域及高端内存区域中查找满足所述程序运行的页面块;
分配子单元,用于在第一个查找到的满足所述程序运行的页面块对应的内存区域中分配内存空间。
优选地,所述图像内存区域位于所述直接存取内存区域、普通内存区域及高端内存区域的任意两个内存区域之间。
优选地,所述查找子单元具体用于:
采用伙伴算法在所述直接存取内存区域、普通内存区域及高端内存区域中与程序所需内存大小相近的页面块的链表中查找;
若没有查找到与程序所需内存大小相近的页面块,则在页面块更大的链表中查找。
优选地,所述分配模块还包括第五分配单元,用于当在所述图像内存区域中分配内存空间失败时,触发所述Linux终端的内存溢出机制进行内存空间的释放,并再次在所述图像内存区域为所述程序分配内存空间。
本发明提出的一种内存管理的方法及Linux终端,根据所获取的分页请求标识,首先在该分页请求标识对应的内存区域中为程序分配内存空间,即当为图像内存区域对应的分页请求标识时,优先在图像内存区域中分配内存空间,在分配失败时,可在CPU内存区域分配内存空间;当不是图像内存区域对应的分页请求标识时,优先在CPU内存区域中分配内存空间,在分配失败时,可在图像内存区域中分配内存空间,本发明在保证并发访问速度不变的前提下,根据程序运行的需要,动态地为CPU及GPU分配内存空间,可以解除现有技术中GPU专用内存的限制,充分高效地使用所有内存空间,在相同内存配置的条件下,本实施例的系统性能更优越。
附图说明
图1是现有技术中CPU及GPU的内存的电路图;
图2是本发明内存管理的方法第一实施例的流程示意图;
图3是本发明内存管理的方法第二实施例的流程示意图;
图4是图3所示的在图像内存区域或CPU内存区域中分配内存空间的一实施例的流程示意图;
图5是图3所示的在图像内存区域或CPU内存区域中分配内存空间的另一实施例的流程示意图;
图6是图5所示的当在图像内存区域中分配内存空间失败时,在CPU内存区域中分配内存空间的一实施例的流程示意图;
图7是本发明Linux终端第一实施例的结构示意图;
图8是本发明Linux终端第二实施例的结构示意图;
图9是图8所示的分配模块一实施例的结构示意图;
图10是图8所示的分配模块另一实施例的结构示意图;
图11是图10所示的第三分配单元的结构示意图。
为了使发明的技术方案更加清楚、明了,下面将结合附图作进一步详述。
具体实施方式
具体地,如图2所示,本发明一实施例提出一种内存管理的方法,包括:
步骤S1,当在Linux终端上运行程序后,获取为所述程序分配内存空间的分页请求标识;
其中,Linux终端可以为计算机或者智能电视等,本实施例以智能电视为例进行说明。
其中,分页请求标识与为程序分配的内存区域对应。通常来说,Linux终端上具有ZONE_DMA(Direct Memory Access,直接存取内存区域)、ZONE_NORMAL(普通内存区域)及 ZONE_HIGHMEM(高端内存区域),每一个内存区域对应一种分页请求标识,例如若分页请求标识为GFG_ NORMAL,则在普通内存区域为该程序分配内存空间。
步骤S2,判断所述分页请求标识是否为预设的图像内存区域对应的分页请求标识,根据判断结果在图像内存区域或CPU内存区域分配内存空间。
其中,本实施例还预先设置一图像内存区域,图像内存区域可以位于上述三个内存区域的任意两个内存区域之间,例如位于直接存取内存区域与普通内存区域之间。
其中,定义上述直接存取内存区域、普通内存区域及高端内存区域为CPU内存区域。
当获取分页请求标识后,首先判断该分页请求标识是否是图像内存区域对应的分页请求标识,即是否为GFG_GPU,根据判断结果在图像内存区域或CPU内存区域分配内存空间。
其中,本实施例中若判断是图像内存区域对应的分页请求标识,则优先在图像内存区域分配内存空间,在图像内存区域分配内存空间失败时,可在CPU内存区域分配内存空间;同理,若判断是CPU内存区域对应的分页请求标识,则优先在CPU内存区域分配内存空间,在CPU内存区域分配内存空间失败时,可在图像内存区域分配内存空间。
本实施例根据所获取的分页请求标识,首先在该分页请求标识对应的内存区域中为程序分配内存空间,即当为图像内存区域对应的分页请求标识时,优先在图像内存区域中分配内存空间,在分配失败时,可在CPU内存区域分配内存空间;当不是图像内存区域对应的分页请求标识时,优先在CPU内存区域中分配内存空间,在分配失败时,可在图像内存区域中分配内存空间,本实施例在保证并发访问速度不变的前提下,根据程序运行的需要,动态地为CPU及GPU分配内存空间,可以解除现有技术中GPU专用内存的限制,充分高效地使用所有内存空间,在相同内存配置的条件下,本实施例的系统性能更优越。
在一优选的实施例中,如图3所示,本发明另一实施例提出一种内存管理的方法,在上述图2实施例的基础上,在上述步骤S1之前还包括步骤S01及步骤S02,其中:
步骤S01,在所述Linux终端中设置所述图像内存区域;
步骤S02,将所述Linux终端的图像专用内存区域映射到所述图像内存区域中,并初始化所述图像内存区域。
本实施例的图像内存区域可位于CPU内存区域中的任意两个内存区域之间,设置图像内存区域包括修改初始化函数、内存分配函数、内存释放函数及增加GFP_GPU分页请求标识等。其中,修改初始化函数主要是修改init.c文件中的arm_bootmem_free函数,修改内存分配函数主要是修改page_alloc.c文件中的alloc_pages_nodemask函数及相关联函数。
将Linux终端的图像专用内存区域映射到图像内存区域中,可使得所有的内存均由操作系统内核同一管理。
在设置图像内存区域完成后,执行初始化图像内存区域的流程,即获取图像内存区域的起始地址、结束地址及图像内存区域的大小,对图像内存区域的空闲页划分为对应的页面块,对图像内存区域对应的页表初始化等。
在一优选的实施例中,如图4所示,上述步骤S2在图像内存区域或CPU内存区域中分配内存空间的步骤包括:
步骤S21,判断所述分页请求标识是否为预设的图像内存区域对应的分页请求标识,若是则转到步骤S22,否则转到步骤S23;
步骤S22,在所述图像内存区域中分配内存空间;
步骤S23,在所述CPU内存区域分配内存空间。
在另一优选的实施例中,如图5所示,上述步骤S2在图像内存区域或CPU内存区域中分配内存空间的步骤还可以包括:
步骤S21,判断所述分页请求标识是否为预设的图像内存区域对应的分页请求标识,若是则转到步骤S22,否则转到步骤S23;
步骤S22,在所述图像内存区域中分配内存空间,若分配成功则结束流程,若分配失败进入步骤S24;
步骤S23,在所述CPU内存区域分配内存空间,若分配成功则结束流程,若分配失败进入步骤S25;
步骤S24,当在所述图像内存区域中分配内存空间失败时,在所述CPU内存区域中分配内存空间;
步骤S25,当在所述CPU内存区域中分配内存空间失败时,在所述图像内存区域中分配内存空间;
步骤S26,当在所述图像内存区域中分配内存空间失败时,触发所述Linux终端的内存溢出机制进行内存空间的释放,并再次在所述图像内存区域为所述程序分配内存空间。
若分页请求标识为图像内存区域对应的分页请求标识,则确定在图像内存区域中分配内存空间,当在图像内存区域中分配内存空间失败时,即图像内存区域中没有足够的剩余内存空间时,按照操作系统内核默认的顺序在直接存取内存区域、普通内存区域及高端内存区域中查找满足条件的内存区域。
本实施例与现有技术不同的是,本实施例预设的图像内存区域优先供GPU使用,但并不仅仅专门供GPU使用,例如当有较多复杂的渲染任务时,预设的图像内存区域可能由于内存空间过小而无法满足条件,此时可以在优先供CPU使用的CPU内存区域中按照默认的顺序查找满足条件的内存区域,避免界面显示异常的问题并保证Linux终端的正常运行。
若分页请求标识不是图像内存区域对应的分页请求标识,则确定在直接存取内存区域、普通内存区域或高端内存区域中分配内存空间,当在直接存取内存区域、普通内存区域或高端内存区域分配内存空间失败时,即这三个内存区域中没有足够的剩余内存空间时,可以在图像内存区域中分配内存空间。
本实施例与现有技术不同的是,本实施例的CPU内存区域优先供CPU使用,但当有较多应用程序在运行时,CPU内存区域可能由于内存空间过小而无法满足条件,此时可以在优先供GPU使用的图像内存区域中分配内存空间。
另外,在上述步骤S25中的在图像内存区域中分配内存空间失败时,触发Linux终端的内存溢出机制(Out Of Memory,OOM)进行内存空间的释放,如强行关闭一些不常用的程序以增加可分配的内存空间,并再次尝试为当前的程序分配内存空间。
与上述实施例不同的是,本实施例在分页请求标识不对应的内存区域中分配内存空间时,若仍然失败,则触发内存溢出机制进行内存空间的释放,并再次尝试为当前的程序分配内存空间。
在一优选的实施例中,如图6所示,上述步骤S24在CPU内存区域中分配内存空间包括:
步骤S241,采用预定算法在直接存取内存区域、普通内存区域及高端内存区域中查找满足所述程序运行的页面块;
步骤S242,在首先查找到的满足所述程序运行的页面块对应的内存区域中分配内存空间。
本实施例在CPU内存区域中分配内存空间时,优选采用伙伴算法查找CPU内存区域中满足程序运行的页面块,具体为在与程序所需内存大小相近的页面块的链表中查找,查找是否有该大小的页面块,若有,则直接分配;若无,则在页面块更大的链表中查找。与在CPU内存区域中分配内存空间一样,在图像内存区域中分配内存空间也采用伙伴算法。
如图7所示,本发明一实施例提出一种Linux终端,包括:
获取模块101,用于当在Linux终端上运行程序后,获取为所述程序分配内存空间的分页请求标识;
其中,Linux终端可以为计算机或者智能电视等,本实施例以智能电视为例进行说明。
其中,分页请求标识与为程序分配的内存区域对应。通常来说,Linux终端上具有ZONE_DMA(Direct Memory Access,直接存取内存区域)、ZONE_NORMAL(普通内存区域)及 ZONE_HIGHMEM(高端内存区域),每一个内存区域对应一种分页请求标识,例如若分页请求标识为GFG_ NORMAL,则在普通内存区域为该程序分配内存空间。
分配模块102,用于判断所述分页请求标识是否为预设的图像内存区域对应的分页请求标识,根据判断结果在图像内存区域或CPU内存区域分配内存空间。
其中,本实施例还预先设置一图像内存区域,图像内存区域可以位于上述三个内存区域的任意两个内存区域之间,例如位于直接存取内存区域与普通内存区域之间。
其中,定义上述直接存取内存区域、普通内存区域及高端内存区域为CPU内存区域。
当获取分页请求标识后,分配模块102判断该分页请求标识是否是图像内存区域对应的分页请求标识,即是否为GFG_GPU,并根据判断结果在图像内存区域或CPU内存区域分配内存空间。
其中,本实施例的分配模块102若判断是图像内存区域对应的分页请求标识,则优先在图像内存区域分配内存空间,在图像内存区域分配内存空间失败时,可在CPU内存区域分配内存空间;同理,若判断是CPU内存区域对应的分页请求标识,则优先在CPU内存区域分配内存空间,在CPU内存区域分配内存空间失败时,可在图像内存区域分配内存空间。
在一优选的实施例中,如图8所示,本发明另一实施例提出一种Linux终端,在上述图7所述的实施例的基础上,还包括:
设置模块099,用于在所述Linux终端中设置所述图像内存区域;
初始化模块100,用于将所述Linux终端的图像专用内存区域映射到所述图像内存区域中,并初始化所述图像内存区域。
本实施例的图像内存区域可位于CPU内存区域中的任意两个内存区域之间,设置模块099设置图像内存区域包括修改初始化函数、内存分配函数、内存释放函数及增加GFP_GPU分页请求标识等。其中,修改初始化函数主要是修改init.c文件中的arm_bootmem_free函数,修改内存分配函数主要是修改page_alloc.c文件中的alloc_pages_nodemask函数及相关联函数。
初始化模块100将Linux终端的图像专用内存区域映射到图像内存区域中,使得所有的内存均由操作系统内核同一管理。
在设置图像内存区域完成后,初始化模块100进行初始化图像内存区域,即获取图像内存区域的起始地址、结束地址及图像内存区域的大小,对图像内存区域的空闲页划分为对应的页面块,对图像内存区域对应的页表初始化等。
在一优选的实施例中,如图9所示,分配模块102包括:
判断单元1021,用于判断所述分页请求标识是否为预设的图像内存区域对应的分页请求标识;
第一分配单元1022,用于若是预设的图像内存区域对应的分页请求标识,在所述图像内存区域中分配内存空间;
第二分配单元1023,用于若不是预设的图像内存区域对应的分页请求标识,在所述CPU内存区域分配内存空间。
在另一优选的实施例中,如图10所示,在上述图9的实施例的基础上,分配模块还包括:
第三分配单元1024,用于当在所述图像内存区域中分配内存空间失败时,在所述CPU内存区域中分配内存空间;
第四分配单元1025,用于当在所述CPU内存区域中分配内存空间失败时,在所述图像内存区域中分配内存空间;
第五分配单元1026,用于当在所述图像内存区域中分配内存空间失败时,触发所述Linux终端的内存溢出机制进行内存空间的释放,并再次在所述图像内存区域为所述程序分配内存空间。
若分页请求标识为图像内存区域对应的分页请求标识,则确定在图像内存区域中分配内存空间,当在图像内存区域中分配内存空间失败时,即图像内存区域中没有足够的剩余内存空间时,按照操作系统内核默认的顺序在直接存取内存区域、普通内存区域及高端内存区域中查找满足条件的内存区域。
本实施例与现有技术不同的是,本实施例预设的图像内存区域优先供GPU使用,但并不仅仅专门供GPU使用,例如当有较多复杂的渲染任务时,预设的图像内存区域可能由于内存空间过小而无法满足条件,此时可以在优先供CPU使用的CPU内存区域中按照默认的顺序查找满足条件的内存区域,避免界面显示异常的问题并保证Linux终端的正常运行。
若分页请求标识不是图像内存区域对应的分页请求标识,则确定在直接存取内存区域、普通内存区域或高端内存区域中分配内存空间,当在直接存取内存区域、普通内存区域或高端内存区域分配内存空间失败时,即这三个内存区域中没有足够的剩余内存空间时,可以在图像内存区域中分配内存空间。
本实施例与现有技术不同的是,本实施例的CPU内存区域优先供CPU使用,但当有较多应用程序在运行时,CPU内存区域可能由于内存空间过小而无法满足条件,此时可以在优先供GPU使用的图像内存区域中分配内存空间。
另外,在上述第四分配单元1025中的在图像内存区域中分配内存空间失败时,触发Linux终端的内存溢出机制(Out Of Memory,OOM)进行内存空间的释放,如强行关闭一些不常用的程序以增加可分配的内存空间,并再次尝试为当前的程序分配内存空间。
与上述实施例不同的是,本实施例在分页请求标识不对应的内存区域中分配内存空间时,若仍然失败,则触发内存溢出机制进行内存空间的释放,并再次尝试为当前的程序分配内存空间。
在一优选的实施例中,如图11所示,第三分配单元1024包括:
查找子单元10241,用于采用预定算法在直接存取内存区域、普通内存区域及高端内存区域中查找满足所述程序运行的页面块;
分配子单元10242,用于在首先查找到的满足所述程序运行的页面块对应的内存区域中分配内存空间。
本实施例在CPU内存区域中分配内存空间时,查找子单元10241优选采用伙伴算法查找CPU内存区域中满足程序运行的页面块,具体为在与程序所需内存大小相近的页面块的链表中查找,查找是否有该大小的页面块,若有,则直接分配;若无,则在页面块更大的链表中查找。与在CPU内存区域中分配内存空间一样,在图像内存区域中分配内存空间也采用伙伴算法。
本发明一种内存管理的方法及Linux终端,根据所获取的分页请求标识,首先在该分页请求标识对应的内存区域中为程序分配内存空间,即当为图像内存区域对应的分页请求标识时,优先在图像内存区域中分配内存空间,在分配失败时,可在CPU内存区域分配内存空间;当不是图像内存区域对应的分页请求标识时,优先在CPU内存区域中分配内存空间,在分配失败时,可在图像内存区域中分配内存空间;在第二次配内存空间,即在分页请求标识不对应的内存区域中分配内存空间时,若仍然失败,则触发内存溢出机制进行内存空间的释放,并再次尝试为当前的程序分配内存空间,本发明在保证并发访问速度不变的前提下,根据程序运行的需要,动态地为CPU及GPU分配内存空间,可以解除现有技术中GPU专用内存的限制,充分高效地使用所有内存空间,在相同内存配置的条件下,本发明的系统性能更优越。
以上所述仅为本发明的优选实施例,并非因此限制本发明的专利范围,凡是利用本发明说明书及附图内容所作的等效结构或流程变换,或直接或间接运用在其它相关的技术领域,均同理包括在本发明的专利保护范围内。

Claims (16)

  1. 一种内存管理的方法,其特征在于,包括以下步骤:
    S1、当在Linux终端上运行程序后,获取为所述程序分配内存空间的分页请求标识;
    S2、判断所述分页请求标识是否为预设的图像内存区域对应的分页请求标识,根据判断结果在图像内存区域或CPU内存区域分配内存空间。
  2. 根据权利要求1所述的方法,其特征在于,所述步骤S2具体为:
    S21、判断所述分页请求标识是否为预设的图像内存区域对应的分页请求标识,若是则转到步骤S22,否则转到步骤S23;
    S22、在所述图像内存区域中分配内存空间;
    S23、在所述CPU内存区域分配内存空间。
  3. 根据权利要求2所述的方法,其特征在于,所述步骤S22后还包括:
    S24、当在所述图像内存区域中分配内存空间失败时,在所述CPU内存区域中分配内存空间;
    所述步骤S23之后还包括:
    S25、当在所述CPU内存区域中分配内存空间失败时,在所述图像内存区域中分配内存空间。
  4. 根据权利要求1所述的方法,其特征在于,所述步骤S1之前包括:
    S01、在所述Linux终端中设置所述图像内存区域;
    S02、将所述Linux终端的图像专用内存区域映射到所述图像内存区域中,并初始化所述图像内存区域。
  5. 根据权利要求3所述的方法,其特征在于,所述CPU内存区域包括:直接存取内存区域、普通内存区域及高端内存区域;
    所述步骤S24具体包括:
    S241、采用预定算法在所述直接存取内存区域、普通内存区域及高端内存区域中查找满足所述程序运行的页面块;
    S242、在首先查找到的满足所述程序运行的页面块对应的内存区域中分配内存空间。
  6. 根据权利要求5所述的方法,其特征在于,所述图像内存区域位于所述直接存取内存区域、普通内存区域及高端内存区域的任意两个内存区域之间。
  7. 根据权利要求5所述的方法,其特征在于,所述采用预定算法在所述直接存取内存区域、普通内存区域及高端内存区域中查找满足所述程序运行的页面块的步骤包括:
    采用伙伴算法在所述直接存取内存区域、普通内存区域及高端内存区域中与程序所需内存大小相近的页面块的链表中查找;
    若没有查找到与程序所需内存大小相近的页面块,则在页面块更大的链表中查找。
  8. 根据权利要求3所述的方法,其特征在于,所述步骤S25之后包括:
    S26、当在所述图像内存区域中分配内存空间失败时,触发所述Linux终端的内存溢出机制进行内存空间的释放,并再次在所述图像内存区域为所述程序分配内存空间。
  9. 一种Linux终端,其特征在于,包括:
    获取模块,用于当在Linux终端上运行程序后,获取为所述程序分配内存空间的分页请求标识;
    分配模块,用于判断所述分页请求标识是否为预设的图像内存区域对应的分页请求标识,根据判断结果在图像内存区域或CPU内存区域分配内存空间。
  10. 根据权利要求9所述的终端,其特征在于,所述分配模块包括:
    判断单元,用于判断所述分页请求标识是否为预设的图像内存区域对应的分页请求标识;
    第一分配单元,用于若是预设的图像内存区域对应的分页请求标识,在所述图像内存区域中分配内存空间;
    第二分配单元,用于若不是预设的图像内存区域对应的分页请求标识,在所述CPU内存区域分配内存空间。
  11. 根据权利要求10所述的终端,其特征在于,所述分配模块还包括:
    第三分配单元,用于当在所述图像内存区域中分配内存空间失败时,在所述CPU内存区域中分配内存空间;
    第四分配单元,用于当在所述CPU内存区域中分配内存空间失败时,在所述图像内存区域中分配内存空间。
  12. 根据权利要求9所述的终端,其特征在于,还包括:
    设置模块,用于在所述Linux终端中设置所述图像内存区域;
    初始化模块,用于将所述Linux终端的图像专用内存区域映射到所述图像内存区域中,并初始化所述图像内存区域。
  13. 根据权利要求11所述的终端,其特征在于,所述CPU内存区域包括:直接存取内存区域、普通内存区域及高端内存区域;所述第三分配单元包括:
    查找子单元,用于采用预定算法在直接存取内存区域、普通内存区域及高端内存区域中查找满足所述程序运行的页面块;
    分配子单元,用于在第一个查找到的满足所述程序运行的页面块对应的内存区域中分配内存空间。
  14. 根据权利要求13所述的终端,其特征在于,所述图像内存区域位于所述直接存取内存区域、普通内存区域及高端内存区域的任意两个内存区域之间。
  15. 根据权利要求13所述的终端,其特征在于,所述查找子单元具体用于:
    采用伙伴算法在所述直接存取内存区域、普通内存区域及高端内存区域中与程序所需内存大小相近的页面块的链表中查找;
    若没有查找到与程序所需内存大小相近的页面块,则在页面块更大的链表中查找。
  16. 根据权利要求11所述的终端,其特征在于,所述分配模块还包括第五分配单元,用于当在所述图像内存区域中分配内存空间失败时,触发所述Linux终端的内存溢出机制进行内存空间的释放,并再次在所述图像内存区域为所述程序分配内存空间。
PCT/CN2014/082598 2014-01-09 2014-07-21 内存管理的方法及Linux终端 WO2015103864A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201410010312.0A CN103744736B (zh) 2014-01-09 2014-01-09 内存管理的方法及Linux终端
CN201410010312.0 2014-01-09

Publications (1)

Publication Number Publication Date
WO2015103864A1 true WO2015103864A1 (zh) 2015-07-16

Family

ID=50501756

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2014/082598 WO2015103864A1 (zh) 2014-01-09 2014-07-21 内存管理的方法及Linux终端

Country Status (2)

Country Link
CN (1) CN103744736B (zh)
WO (1) WO2015103864A1 (zh)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110471759A (zh) * 2019-07-04 2019-11-19 中科晶上(苏州)信息技术有限公司 一种多核嵌入式处理器内存实时动态管理方法
CN115202892A (zh) * 2022-09-15 2022-10-18 粤港澳大湾区数字经济研究院(福田) 一种机密计算协处理器的内存扩展系统和内存扩展方法

Families Citing this family (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103744736B (zh) * 2014-01-09 2018-10-02 深圳Tcl新技术有限公司 内存管理的方法及Linux终端
CN105630599B (zh) * 2014-10-28 2019-02-15 龙芯中科技术有限公司 基于32/64位混合操作系统的显存分配方法及装置
CN104407985B (zh) * 2014-12-15 2018-04-03 泰斗微电子科技有限公司 存储器地址映射方法及存储器地址映射系统
CN104850423B (zh) * 2015-01-16 2017-12-26 中国矿业大学 识别android系统下应用程序启动阶段的方法
CN106484632A (zh) * 2015-09-01 2017-03-08 华耀(中国)科技有限公司 在Linux系统用户空间分配连续物理内存的方法
CN106611401B (zh) * 2015-10-22 2020-12-25 阿里巴巴集团控股有限公司 一种在纹理内存中存储图像的方法及装置
CN107770101B (zh) * 2016-08-15 2021-07-16 中兴通讯股份有限公司 一种fpga中通用成帧规程gfp帧的封装方法及装置
CN106648594B (zh) * 2016-09-30 2020-07-10 海信视像科技股份有限公司 终端启动方法和装置
CN109376002A (zh) * 2018-08-14 2019-02-22 广东格兰仕集团有限公司 一种基于烤箱控制系统的内存优化控制方法
CN109815192B (zh) * 2019-01-31 2024-06-11 深兰机器人(上海)有限公司 一种嵌入式系统内存管理方法及装置
CN113051072A (zh) * 2021-03-02 2021-06-29 长沙景嘉微电子股份有限公司 内存管理方法,装置,系统及计算机可读存储介质

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070033367A1 (en) * 2005-08-04 2007-02-08 Premanand Sakarda Memory manager for heterogeneous memory control
CN101976225A (zh) * 2010-10-26 2011-02-16 深圳创维-Rgb电子有限公司 一种数字机顶盒系统内存的分配方法、模块和装置
CN102156675A (zh) * 2010-02-12 2011-08-17 中兴通讯股份有限公司 一种内存分配方法及装置
CN102314688A (zh) * 2011-09-09 2012-01-11 华中科技大学 图像分割方法和图像集分割方法
CN103163949A (zh) * 2011-12-13 2013-06-19 技嘉科技股份有限公司 计算机系统及其内存指定方法
CN103744736A (zh) * 2014-01-09 2014-04-23 深圳Tcl新技术有限公司 内存管理的方法及Linux终端

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1276361C (zh) * 2003-12-29 2006-09-20 北京中视联数字系统有限公司 一种嵌入式系统内存管理的方法
CN100359489C (zh) * 2004-07-13 2008-01-02 中兴通讯股份有限公司 一种嵌入式实时操作系统中内存分配的方法
CN101149703A (zh) * 2007-10-10 2008-03-26 中兴通讯股份有限公司 一种固定内存的管理方法
CN103425592B (zh) * 2013-08-05 2016-08-10 大唐移动通信设备有限公司 一种多进程系统中的内存管理方法及装置

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070033367A1 (en) * 2005-08-04 2007-02-08 Premanand Sakarda Memory manager for heterogeneous memory control
CN102156675A (zh) * 2010-02-12 2011-08-17 中兴通讯股份有限公司 一种内存分配方法及装置
CN101976225A (zh) * 2010-10-26 2011-02-16 深圳创维-Rgb电子有限公司 一种数字机顶盒系统内存的分配方法、模块和装置
CN102314688A (zh) * 2011-09-09 2012-01-11 华中科技大学 图像分割方法和图像集分割方法
CN103163949A (zh) * 2011-12-13 2013-06-19 技嘉科技股份有限公司 计算机系统及其内存指定方法
CN103744736A (zh) * 2014-01-09 2014-04-23 深圳Tcl新技术有限公司 内存管理的方法及Linux终端

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110471759A (zh) * 2019-07-04 2019-11-19 中科晶上(苏州)信息技术有限公司 一种多核嵌入式处理器内存实时动态管理方法
CN110471759B (zh) * 2019-07-04 2023-09-01 中科晶上(苏州)信息技术有限公司 一种多核嵌入式处理器内存实时动态管理方法
CN115202892A (zh) * 2022-09-15 2022-10-18 粤港澳大湾区数字经济研究院(福田) 一种机密计算协处理器的内存扩展系统和内存扩展方法

Also Published As

Publication number Publication date
CN103744736A (zh) 2014-04-23
CN103744736B (zh) 2018-10-02

Similar Documents

Publication Publication Date Title
WO2015103864A1 (zh) 内存管理的方法及Linux终端
WO2018223602A1 (zh) 显示终端、画面对比度提高方法及计算机可读存储介质
WO2015106497A1 (zh) 一种基于当前vcpu调度状态的动态中断均衡映射方法
WO2018120429A1 (zh) 一种资源更新的方法、终端、计算机可读存储介质及资源更新设备
WO2017121066A1 (zh) 应用程序显示方法和系统
WO2018014567A1 (zh) 一种提高虚拟机性能的方法、终端、设备及计算机可读存储介质
WO2017107378A1 (zh) 基于hls流媒体的视频数据加速下载方法及装置
WO2019114262A1 (zh) 加载用户界面的方法、智能电视及计算机可读存储介质
WO2016000560A1 (en) File transmission method, file transmission apparatus, and file transmission system
WO2019051902A1 (zh) 终端控制方法、空调器及计算机可读存储介质
WO2018113187A1 (zh) 一种显示控制方法及显示装置
WO2018036057A1 (zh) 软件后台自适应升级方法及装置
WO2018126888A1 (zh) 电视功能的快捷启动设置方法及装置
WO2017219485A1 (zh) 智能电视及其控制方法
WO2017024877A1 (zh) 电视主界面的切换方法及装置
WO2019056733A1 (zh) 并发量控制方法、应用服务器、系统及存储介质
WO2017088427A1 (zh) 音频输出控制方法及装置
WO2016187998A1 (zh) 动态调整背光方法及装置
WO2019051909A1 (zh) 空调器运行参数调整方法、空调器及计算机可读存储介质
WO2018121026A1 (zh) 一种机顶盒配置方法及系统
WO2018086291A1 (zh) 资源调度方法、装置、设备及计算机可读存储介质
WO2019210574A1 (zh) 消息处理方法、装置、设备及可读存储介质
WO2019080247A1 (zh) 产生保单批文的方法、装置、设备及计算机可读存储介质
WO2018006581A1 (zh) 智能电视的播放方法及装置
WO2016095256A1 (zh) 智能电视的全局按键处理方法及其系统

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 14878194

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205N DATED 15.09.2016)

122 Ep: pct application non-entry in european phase

Ref document number: 14878194

Country of ref document: EP

Kind code of ref document: A1