Can shared memory segments be resized?
Can shared memory segments be resized?
- Subject: Can shared memory segments be resized?
- From: Stéphane Letz <email@hidden>
- Date: Thu, 9 Dec 2004 13:11:11 +0100
Hi,
I am porting code from Linux that needs to resize shared memory
segments. Basically the resize function does the following:
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);
But the ftruncate call fails. ( I remember reading that ftruncate could
only be used for new created memory segments)
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 (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden