The present invention discloses a memory
allocation method and
delay perception-memory allocation apparatus suitable for memory access
delay balance among multiple nodes in an NUMA construction. The apparatus comprises a
delay perception unit (1) embedded inside a GQ unit of the NUMA multi-core construction, and a memory allocation unit (2) embedded inside a Linux
operating system. According to the memory
allocation method disclosed by the present invention, memory access delay among nodes in memory can be perceived periodicallyby the delay
perception unit (1), whether memory access delay among nodes in memory is balanced can be obtained by the memory allocation unit (2), and a memory allocation node is selected according to a balance state, and is finally output to the Buddy
memory allocator of the Linux
operating system, thereby realizing physical memory allocation. According to the apparatus disclosed by the present invention aiming at an NUMA multi-core construction
server, in the premise of ensuring memory access delay balance, application performance is stabilized, and unfairness of
shared memory among application processes is reduced.