摘要 |
A memory management device and method, which relate to the technical field of information. The method comprises: acquiring a memory which is to be allocated and is of a predetermined size (S502); creating a shared memory pool according to the memory to be allocated, with the shared memory pool comprising n memory blocks of which the length is a predetermined length and which are obtained by dividing the memory to be allocated, and the shared memory pool being used for a memory application service for providing memory blocks of at least two different lengths (S504); acquiring a demanded length corresponding to a memory application (S506); and acquiring, from the shared memory pool, a memory block of which the length is the demanded length for use in allocation (S508). The technical solution solves the problems in the related art of a serious waste of a memory and a low total utilization rate of the memory. Memory blocks of different lengths share a shared memory pool, so that it cannot only be guaranteed that peak demands of the memory blocks of different lengths are coped with when a memory is allocated, but also the effects of saving a memory and improving a total utilization rate of the memory can be achieved. |