site_archiver@lists.apple.com Delivered-To: darwin-kernel@lists.apple.com Mike Smith writes:
On Jun 17, 2005, at 11:24 AM, Glen Beane wrote:
I just really need (actually, would like) to get a *rough* idea of how memory is fragmented - if I have a HPC application that allocates a large amount of memory, how fragmented is that in physical ram. It's not the end of the world if I can't, but it would definitely be helpful (for a number of reasons that are outside the scope of my question)...
I'm really only concerned with one or two processes
If you can make some minor changes to the application and write an I/ O kit driver, you could easily have the app issue an I/O against the driver and then have the driver use the IOKit functionality to do the virtual->physical mapping. That avoids trying to go backwards, which is what you're describing there.
I haven't had my coffee yet, so excuse me if I'm missing something simple... But won't using an IOKit driver to do virt->phys translations require using IOMemoryDescriptors and "preparing" the memory? This would require page-ins if the memory was not currently resident, so you might see 2 different virtual address mapped to the same physical address.. If it is somehow possible to get a hold of the thread's pmap, it seems like it *might* be better to walk the address space using the (unsupported) pmap_find_phys. 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