The invention provides a memory allocation method and a memory allocation device. The memory allocation method includes recording a memory module (RANK) to which each memory block group belongs; arranging the RANKs in a system according to a minimum free time rate priority (Min Free) mode or a least recently used (LRU) mode; determining size of a memory needed to be allocated, aiming at each RANK after arrangement, sequentially executing a step A: A, adopting a buddy system (BUDDY) algorithm to find the memory block groups which can be allocated in the memory block groups belonging to the RANK, if the memory block groups which can be allocated exist, performing allocation, recording an RANK to which new memory block groups generated after allocation belong, and finishing current processes; if the memory block groups which can be allocated do not exist, aiming at a next RANK, repeatedly executing the step A until the memory block groups are allocated successfully. By the memory allocation method and the memory allocation device, allocated memory block groups are enabled to belong to few RANKs as far as possible, so that convenience is brought to power consumption control of a memory system.