In this paper, we propose a dynamic memory allocation approach for Xen virtualization platforms, called critical amount guaranteed memory allocation (CAGMA), to expand or shrink the allocated memory of each virtual machine (VM) dynamically with a guaranteed amount of available memory. The performance of a VM might be degraded when its available memory is insufficient (i.e., it might generate a large amount of I/O activities for swapping in and out of data to disks). Under CAGMA, a critical memory amount is calculated for each VM periodically and at the time a swapping event is occurred. The allocated memory of each VM is then adjusted according to its critical memory amount so that the number of I/O activities generated for swapping could be reduced greatly and the performance degradation could be prevented. Our proposed CAGAM has been implemented in Xen 4.2.2 and a series of experiments have been conducted for which some encouraging results were obtained.