import "objects/process.def"

object vma : object {
    uid d6a12b63b3ed3937
    cname vm_area

    capabilities [
        map
        unmap
        resize
    ]

    method create [constructor] {
        param size size
        param flags uint32
    }

    method create_map [constructor cap:map] {
        param size size
        param address address [inout]
        param flags uint32
    }

    method map [cap:map] {
        param process ref process [optional]
        param address address [inout]
        param flags uint32
    }

    method unmap [cap:unmap] {
        param process ref process [optional]
    }

    method resize [cap:resize] {
        param size size [inout]  # New size for the VMA, or 0 to query the current size without changing
    }
}
