Any string available to Perl will have been copied into a Perl structure. You can free the C structure all you like. I don't think you'll succeed in making it read-only, but it certainly won't affect the string the C code points to.
What I want to avoid is exactly this copying. The strings are located in a mem segment that is mmapped read-only. So, there is no way for them to be changed and hence no need to be copied.
The buffers of Perl strings are subject to modification and freeing at any time. It *might* be possible to tell Perl the PV associated with a scalar can't be changed, but
there's no way to tell Perl to use a existing memory block for the string buffer of a string, and
there's no way to tell Perl the string buffer of a string can't be freed.