RE: Memory allocation problem in kernel space.....
site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com Thread-index: AceFt2vzp5IL0bmJTAur/ZzsxqXhBgBU58nw Hi Shawn, When I use IOMallocAligned the time for execution increases 200%. For eg : A 10 gb disk takes 13 min to complete using new(). Same disk when allocated using IOMalloc() takes 26 min approx. This is the case when I replace medium and small memory allocation using new() by IOMalloc. If I Use IOMallocPageable() or IOMallocAligned() for above case it works fine i.e. time taken is same for new() and later functions. But problem starts when I allocate Huge memory for my pointer using IOMallocPageable() or IOMallocAligned(). Allocation does not fails but when my process uses it after some time system crashes. But when I Use new() nothing fails and it works fine. Problem with new is, it fails to allocate for more than 4 instances of 10 GB disk. My requirement is to run 10 instances of 10 GB. UInt32 * ptr = new UInt32(1024*80); // Huge memory no failure case but fails from 4th instances. Or UInt32 * ptr = (UInt32 *)IOMallocPageable(1024*80, 256); // Huge memory it allocates but later on while using this mem system crashes. Not able to complete single instance. But if I use new() for Huge memory and use IOMallocPageable() for rest of my mem allocations it works fine for a instance. But I want my huge memory to be handled. Please suggest and if I am wrong anywhere please give pointers. Thanks Gaurav On Apr 22, 2007, at 10:46 PM, Gaurav Kumar wrote:
I am using IOkiit framework for my driver in cpp and Mac OS 10.4.8.
IOmalloc and malloc not able to allocate memory for my requirement.
Can you better explain why IOMalloc or IOMallocPageable (and friends) are not able to meet your requirements? Anyway review... <http://developer.apple.com/documentation/Darwin/Conceptual/ KernelProgramming/vm/chapter_7_section_9.html> -Shawn _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/site_archiver%40lists.appl... This email sent to site_archiver@lists.apple.com
participants (1)
-
Gaurav Kumar