require '_h2ph_pre.ph';

unless(defined(&VM_H)) {
    eval 'sub VM_H () {1;}' unless defined(&VM_H);
    require 'sys/types.ph';
    require 'sys/vmmeter.ph';
    require 'sys/queue.ph';
    require 'vm/vm_param.ph';
    require 'sys/lock.ph';
    require 'uvm/uvm_extern.ph';
    require 'vm/vm_page.ph';
    require 'vm/pmap.ph';
    require 'uvm/uvm_map.ph';
    eval 'sub vm_startcopy () { &vm_rssize;}' unless defined(&vm_startcopy);
    if(defined(&pmap_resident_count)) {
	eval 'sub vm_resident_count {
	    local($vm) = @_;
    	    eval q(( &pmap_resident_count(($vm)-> ($vm_map->{pmap}))));
	}' unless defined(&vm_resident_count);
    } else {
	eval 'sub vm_resident_count {
	    local($vm) = @_;
    	    eval q((($vm)-> &vm_rssize));
	}' unless defined(&vm_resident_count);
    }
}
1;
