Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Memory Restriction in Kext




On Aug 23, 2007, at 22:38 , JanakiRam wrote:

Hi ALL,

I'm a newbie to the kernel programming. Can any one clarify my following querie(s).

i) Is there any restriction imposed on the memory to be allocated inside a KEXT and its related functions .
IMOO the new/delete operations do not use such generic memory management as for example IOMalloc, so new/delete have some additional
limitations for listed below...

ii) If so , Whats the maximum limit ?

If you use IOMalloc, then you restricted to the comparably small limit of about 100 -- 200 Mb (I don't know the actual size of the pool)
If you use IOBufferMemoryDescriptor then you limited with 4Gb address space.
If you use 10.4 64-bit memory manager/IODMACommand you have full 64-bit addressing.


iii) Can i allocate 1MB ( i.e. char [1024][1024] ) memory in generic kext start function ?
Yes you may but remember that heavy loading of stack is not a good practice that leeds to the system inconsistency and difficultly tested bugs.


          Please help me . Thanks in Advance.

-JanakiRam.

_______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-kernel mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-kernel/email@hidden

This email sent to email@hidden
References: 
 >Memory Restriction in Kext (From: JanakiRam <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.