Patent ID: 8060706
Filing Date: 2011-11-15
Classification: G06F

Abstract:
1. A method of allocating a physical memory in a specified address range under a Linux system platform, applied in a test process of a physical memory in a Linux operating system, the method comprising: obtaining a specified address range and a size of a memory to be allocated; examining each node in the system to determine whether a memory address range at each node has an intersection with the specified address range or not; if an intersection is found, examining each zone in the node to determine whether a memory address range at each zone has an intersection with the specified address range or not; if an intersection is further found, searching memory blocks meeting the size and specified address range requirements in a memory block list of per-CPU page frame cache and buddy system at each zone; splitting and then taking out the memory blocks from the memory block list; and repeatedly searching memory blocks meeting the size and specified address range requirements in each zone, and splitting and then taking out obtained memory blocks, till the required size of memory has been successfully allocated, or no memory blocks meeting the specified address range requirement are found in each zone, or free memories in each zone are reduced to a lower limit of system kernel security, so as to transmit information about all allocated memory blocks, and thereby mapping, inspecting, and releasing the memory blocks.