| CPC G06F 9/5016 (2013.01) [G06F 12/0811 (2013.01); G06F 2212/608 (2013.01)] | 15 Claims |

|
1. A method performed by a memory allocator in a computer system for allocating memory to applications, wherein the computer system comprises at least one computer server comprising a plurality of central processing unit (CPU) cores, the plurality of CPU cores comprising a first CPU core and a second CPU core, and the computer server further comprising at least a first memory unit and a second memory unit having different data access times, and wherein the second memory unit is divided into a plurality of slices, wherein the plurality of slices of the second memory unit comprises a first slice and a second slice, the first slice is associated with the first CPU core, and the second slice is associated with the second CPU core, the method comprising:
receiving a request from an application for allocating memory to the application, wherein the application is running on the first CPU core;
in response to the request, selecting a memory block from the first memory unit, wherein the memory block comprises a set of memory chunks;
determining whether at least T number of the memory chunks included in the selected memory block of the first memory unit are associated with the first slice of the second memory unit, where T is a predetermined threshold;
in response to determining that at least T number of the memory chunks included in the selected memory block of the first memory unit are associated with the first slice of the second memory unit, allocating the selected memory block to the requesting application.
|