Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re^3: Memory mapped file questions

by Corion (Patriarch)
on Oct 10, 2020 at 07:55 UTC ( [id://11122654]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Memory mapped file questions
in thread Memory mapped file questions

How much of your C# code do you understand?

Reading your code, there is the line:

MemoryMappedFile.CreateOrOpen("Test", 1000, MemoryMappedFileAccess.Rea +dWrite);

This suggests that the code opens or creates a file named Test in the current directory, and as jcb suggests, you could use that as the filename.

If this is your code, maybe you want to use a different approach than a memory mapped file. If this is not your code, consider talking to the original author about using a different serialization scheme, like JSON, or a well-defined binary layout, or just not using a memory mapped file when a plain file will do just as well.

Replies are listed 'Best First'.
Re^4: Memory mapped file questions
by faustf (Novice) on Oct 10, 2020 at 09:21 UTC
    Msdn docet MemoryMappedFile.CreateOrOpen Metod: Creates a new empty memory-mapped file or opens an existing one IF one with the same name exists. (i assure not exist a file in my HDD with name Test ) if i wanted to open a file i would used this MemoryMappedFile.CreateFromFile Create a memory-mapped file from a disk file.

      If you don't create the file on disk, how do you expect Perl to read from that file?

      My suggestion to you is to look at other approaches of passing data to another program than using an unnamed memory mapped file.

        I thought it could do it like c++ or c# does, therefore you confim perl is not able to do that ?

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11122654]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (3)
As of 2024-04-25 05:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found