The present disclosure provides a
memory management method, an electronic device and a program product, and relates to the technical field of computers. The
memory management method comprises the following steps: dividing a
DRAM cache into a plurality of cache sets, and dividing each cache set into a plurality of logical subsets, each logical subset containing a plurality of physical cache paths; constructing a
metadata tree corresponding to each cache set; in response to a memory access request, determining a
physical address corresponding to the memory access request; determining a cache set corresponding to the memory access request; determining whether the memory access request is a hit; in the case that the memory access request is not a hit and there is no idle physical cache path, locating a target logical subset from the
metadata tree according to path indication information; selecting a target physical cache path according to a reference prediction value; replacing the storage content of the target physical cache path with request data, and updating the reference prediction value of the target physical cache path to an initial value.