摘要 |
A memory allocation method. The method is applicable to a computer system, and the computer system comprises a memory resource, a BOIS and an OS, wherein the memory resource contains initial mirroring memory. When the operating system is running, the method comprises: acquiring unoccupied mirroring memory in the initial mirroring memory, wherein the initial mirroring memory is mirroring memory indicated by a mirroring memory address interval provided to the OS by the BOIS during the initialization of the OS (101); detecting data of memory to be allocated (102); and when it is detected that the data is data to be stored in the mirroring memory, allocating the mirroring memory to the data to be stored in the mirroring memory from the unoccupied mirroring memory (103). The above-mentioned memory allocation method can accurately find the mirroring memory, and allocate the mirroring memory to the data needing to be stored in the mirroring memory, thereby ensuring the use efficiency of limited mirroring memory. |