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 23, 2007, at 7:46 AM, Shawn Erickson wrote:
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?
And also <http://developer.apple.com/qa/qa2001/qa1197.html>.
The title of the Q&A refers to mapping kernel memory to userland, but the
usage of IOBufferMemoryDescriptor vs. IOMalloc described in the Q&A is
pertinent.
____________________________________________________________________
Apple Developer
Technical Support
WWDC 2007 • June
11-15 • Moscone West • San Francisco,
CA