• 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: How can I get the maximum shared memory segment size in program?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How can I get the maximum shared memory segment size in program?


  • Subject: Re: How can I get the maximum shared memory segment size in program?
  • From: "Justin C. Walker" <email@hidden>
  • Date: Fri, 28 Dec 2007 21:47:38 -0800


On Dec 28, 2007, at 21:34 , bady yu wrote:

I can use "sysctl kern.sysv.shmmax" or "ipcs -M" to get the integer (4194304). But they are both command line tools. It is not convenient to call it inside the problem.

I also have tried to use the sysctlbyname system call: sysctlbyname ("kern.sysv.shmmax", &shmmax, &len, NULL, NULL). Although this call return 0, the shmmax variable does not hold the correct value.

By the way, my system is Leopard.

Can anybody tell me an appropriate way? Thank you in advance!

'sysctl(1)' just uses 'sysctl(2)'. Check the man page ("man 2 sysctl") and the source for 'sysctl(1)' available on Apple's Darwin website (the 'system_cmds-431' project, for 10.5).


Justin

--
Justin C. Walker, Curmudgeon-At-Large
Institute for the Absorption of Federal Funds
--------
Men are from Earth.
Women are from Earth.
   Deal with it.
--------



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


References: 
 >How can I get the maximum shared memory segment size in program? (From: bady yu <email@hidden>)

  • Prev by Date: How can I get the maximum shared memory segment size in program?
  • Next by Date: Re: pipes, scripts, and launchd
  • Previous by thread: How can I get the maximum shared memory segment size in program?
  • Next by thread: Re: How can I get the maximum shared memory segment size in program?
  • Index(es):
    • Date
    • Thread