Forum > Operating Systems

How to use map file in Lazarus installed on Debian?

(1/1)

safa:
I'm using lazarus installed on Debian and i need to use a map file in my application, but I can't find any tutorial online, to be clearer: I want to know how to create a map file, then use it in a multithreaded application, so a principal thread creates that file, then the secondary threads write data on it (so they copy data from a memorystream to a mapfile). I already used a mapfile in windows, but using it on linux is a bit different. Can anyone explain to me how to realise this task? Thanks for your replies

Septe:
Let me do a shot in the dark.  After much contemplation and searching the net plus the way you described your problem, I think you mean a type of data storage using mapped values.  Is this correct?  If it's not correct, then you need to tell us what you mean by map file?  Is it an actual map like what we use to find our way in the world?  Quake uses map files but I doubt it's that.  In any case, there's many cases as what a map file could be.  You're going to have to be very specific as to what you mean.

molly:
OP is clearly talking about a memory mapped file (or filemapping as MS calls it), as his description talks about multiple threads wanting to access the same data.

I was able to find this. Maybe it helps as it uses some terminology and variables/functions that are specific to mapping files in linux, so perhaps that can help with the searches.

marcov:
The mmap call is available in baseunix as "fpmmap"

safa:

--- Quote from: Septe on January 06, 2016, 10:58:13 pm ---Let me do a shot in the dark.  After much contemplation and searching the net plus the way you described your problem, I think you mean a type of data storage using mapped values.  Is this correct?  If it's not correct, then you need to tell us what you mean by map file?  Is it an actual map like what we use to find our way in the world?  Quake uses map files but I doubt it's that.  In any case, there's many cases as what a map file could be.  You're going to have to be very specific as to what you mean.

--- End quote ---
You can read molly's answer  to understand what I'm talking about  :)

--- Quote from: molly on January 06, 2016, 11:17:54 pm ---OP is clearly talking about a memory mapped file (or filemapping as MS calls it), as his description talks about multiple threads wanting to access the same data.

I was able to find this. Maybe it helps as it uses some terminology and variables/functions that are specific to mapping files in linux, so perhaps that can help with the searches.

--- End quote ---
In fact, I could only find tutos using C language, i'll try to understand, but i also found this: http://sourceforge.net/p/lazarus-ccr/svn/HEAD/tree/components/onguard/source/ogproexe.pas

Navigation

[0] Message Index

Go to full version