Re: Basic Kernel Extension Programming questions
site_archiver@lists.apple.com Delivered-To: darwin-kernel@lists.apple.com Thank you for the reply. I had considered that and tried 4096 bytes -1 page. Still panics. Very frustrating especially since I know doing this is possible ( google MacMemoryReader ). On Nov 18, 2011, at 11:27 AM, Andrew Gallatin <gallatin@cs.duke.edu> wrote:
What I am attempting to do now is to see if I can loop over all 8gb of physical memory
for ( x = 0; x < 1024 * 1024 * 1024 * 8; x++ ) { descriptor = IOMemoryDescriptor::withPhysicalAddress( x, 10, kIODirectionOut ); descriptor->prepare( kIODirectionOut ); descriptor->readBytes( 0, buffer, 10 ); descriptor->complete(); descriptor->release(); }
You will almost certainly still run into problems, but reading in 10 byte chunks is almost certainly causing you more problems, since you're going to be reading odd lengths.
Try reading 4 or 8 bytes.
I'd say the odds are good that you'll still crash, but who knows..
Drew
_______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-kernel mailing list (Darwin-kernel@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-kernel/site_archiver%40lists.a... This email sent to site_archiver@lists.apple.com
participants (1)
-
Eric Gorr