![]() |
|
We don't bite newbies here... much | |
PerlMonks |
Re: Does perl have a builtin limit to the size of shared memory segments I can write to?by NERDVANA (Priest) |
on Jan 07, 2025 at 20:56 UTC ( [id://11163617]=note: print w/replies, xml ) | Need Help?? |
Yes, this looks like a bug in Perl.
The parameters are stored into variables declared as I32, rather than SSize_t. The mem-read and mem-write are performed in Perl rather than a system call, so there's no reason to truncate the offset and length to 32-bit.
I'm afraid you won't be able to get a fix for this unless you recompile your own perl, but please consider filing a bug report so that perl 5.42 could have it fixed. Meanwhile, there is File::Map which is basically the same thing, except you have to create your own files (in tmpfs if you want them to be pure RAM). You also have to be careful not to accidentally copy that mapped scalar, which would be expensive.
In Section
Seekers of Perl Wisdom
|
|