Date: Mon, 1 Dec 2008 23:20:20 +0100 From: "Alexej Sokolov" <bsd.quest@googlemail.com> To: freebsd-hackers@freebsd.org Subject: getting vm_object from allocated memory in kernel Message-ID: <671bb5fc0812011420o6f20d8a0j691e4650aca2733f@mail.gmail.com>
next in thread | raw e-mail | index | archive | help
SGVsbG8sCkkgdHJ5IHRvIGFsbG9jYXRlIGEgbWVtb3J5IGluIHRoZSBzeXN0ZW0gY2FsbCBhbmQg dGhlbiBJIHdvdWxkIGxpa2UgdG8gZ2V0CnZtX29iamVjdApvZiBhbGxvY2F0ZWQgc3BhY2UgdG8g cmVtYXAgaXQgbGF0ZXI6CgovKiBTeXNjYWxsIGZ1bmMgKi8Kc3RhdGljIGludApzeXNjZihzdHJ1 Y3QgdGhyZWFkICp0ZCwgdm9pZCAqc2EpCnsKLi4uCiAgICAgICAgdm1fb2Zmc2V0X3QgYWRkcjsK Li4uCiAgICAgICAgTUFMTE9DKGFkZHIsIHZtX29mZnNldF90LCBQQUdFX1NJWkUsIE1fREVWQlVG LCBNX1dBSVRPSyB8IE1fWkVSTyk7CgovKiBUaGVuIEkgdHJ5IHRvIGdldCB2bV9vYmogKi8KICAg ICAgICB2bV9tYXBfbG9va3VwKCZrZXJuZWxfbWFwLCBhZGRyLCBWTV9QUk9UX0FMTCwKICAgICAg ICAgICAgICAgICAgICAgICAgJm15ZW50cnksICZteW9iamVjdCwgJm15cGluZGV4LCAmbXlwcm90 LCAmbXl3aXJlZCk7Ci8qIE9VVCAqLwogICAgICAgIHZtX21hcF9sb29rdXBfZG9uZSgma2VybmVs X21hcCwgbXllbnRyeSk7CgovKiBJZiBpIHRyeSB0byBtYWtlIHN5c3RlbSBjYWxsIGl0IHdvcmsg c3VjY2Vzc2Z1bCBidXQgYWZ0ZXIgYSBmZXcgc2Vjb25kcwpoYXBwZW5zCiAgICBrZXJuZWwgcGFu aWMgKi8KCi4uLgp9Cgpjb3VsZCBhbnlvbmUgZ2l2ZSBtZSBhIHRpcCB3aGF0IE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