In reply to Guan:
I’m assuming you are getting a “out of space” error.
The uvm_reg model would create a class object for every element of a memory. That object contains significantly more data than the element it is modeling, including the mirrored and desired register values. The main use of uvm_mem is having the same read/write abstraction layer and the memory mapping feature which maps a name to a physical address and a particular driver interface. You can also setup backdoor access.