Re: How can I get the maximum shared memory segment size in program?
site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com -- Terry By the way, my system is Leopard. Can anybody tell me an appropriate way? Thank you in advance! _______________________________________________ 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/tlambert%40apple.com _______________________________________________ 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... You did not provie the types of len or shmmax, nor whether or not len contains sizeof(shmmax), nor whether you are calling this from a 32 or 64 bit program. But I suspect you are passing the wrong type and size in to the sysctlbyname() call. On Dec 28, 2007, at 9:34 PM, bady yu <bady.yu@gmail.com> 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. This email sent to tlambert@apple.com This email sent to site_archiver@lists.apple.com
participants (1)
-
Terry Lambert