Can shared memory segments be resized?
site_archiver@lists.apple.com Delivered-To: Darwin-dev@lists.apple.com Hi, shm_fd = shm_open (name, O_RDWR, 0666)) ; munmap (addr, old_size) ftruncate (shm_fd, new_size); mmap (0, new_size, PROT_READ|PROT_WRITE, MAP_SHARED, shm_fd, 0); Can shared memory segments be resized on Darwin? Any idea how to implement this? Thanks Stephane letz _______________________________________________ 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... I am porting code from Linux that needs to resize shared memory segments. Basically the resize function does the following: But the ftruncate call fails. ( I remember reading that ftruncate could only be used for new created memory segments) This email sent to site_archiver@lists.apple.com
participants (1)
-
Stéphane Letz