prototype for get_vmem func.