• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: kev_msg_post size limitation
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: kev_msg_post size limitation


  • Subject: Re: kev_msg_post size limitation
  • From: Michael Smith <email@hidden>
  • Date: Mon, 2 Oct 2006 03:51:58 -0700


On Oct 2, 2006, at 1:38 AM, Jérome Foucher wrote:

I'm posting events from my KEXT to a user-land process using kev_msg_post()

The doc states that this function returns EMSGSIZE if the message is too large.
This is quite an issue for me, and the doc doesn't say anything about the max size.


So can anyone tell me :
- what is the exact maximum size of the message structure ?
- if the max size depends on the kev_class or kev_subclass parameters of the message ?
- if there's another function to use instead of kev_msg_post() to post larger messages to user-land (I might have to post messages as large as 1KB), or do I have to split my message into several pieces (in that case, can I be sure my user-land process will receive the messages in the exact post order ?) ?

Don't post large messages to user space. Doing so assumes that the kernel will queue these messages for you, and that it will do so in a fashion that suits your application. It also means that the message will have to be copied, and the kernel is on the hook to hold onto that message effectively forever.


Instead, post a message to your application telling it to come fetch this large message, or consider using an another method of communication that has a buffering model that suits your application (e.g. kernel control socket, I/O Kit userclient methods).

 = Mike

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-kernel mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >kev_msg_post size limitation (From: Jérome Foucher <email@hidden>)

  • Prev by Date: kev_msg_post size limitation
  • Next by Date: Kernel Debug Kits for 10.4.8
  • Previous by thread: kev_msg_post size limitation
  • Next by thread: Kernel Debug Kits for 10.4.8
  • Index(es):
    • Date
    • Thread