|Subject:||"size" argument may not work as advertised.|
IPC::Shareable permits a "size" argument to be specified when calling tie(). According to the POD, this argument "may be used to specify the size of the shared memory segment allocated." In reality, this argument is being used when calling shmget() inside sub new on line 48: my $id = shmget($key, $size, $flags); But the second argument of shmget has nothing to do with specifying the size of the segment. It's used to specify the address of the shared memory segment that is to be attached:If shmaddr isn't NULL and SHM_RND is specified in shmflg, the attach occurs at the address equal to shmaddr rounded down to the nearest mul- tiple of SHMLBA. Otherwise shmaddr must be a page-aligned address at which the attach occurs. When trying to use IPC::Shareable with a size argument other than IPC::Shareable::SHM_BUFSIZ, it is highly likely that the user will encounter "Could not create shared memory segment: Invalid argument"