how to write share memory file name to RAM

One of share objects, share memory , is signed with a file name , and we must operate it by the file name . Our program is OK on our harddisk , but when we write our program to EPROM , our program can’t run .It will stop at share memory . We think that we can’t EPROM when our program is running , but we must use share memory , so we are going to use RAM file , but we don’t know how to use RAM file to move our file name to RAM . Do you have some good advice ? Thanks a lot !