File Mapping in Linux
Hi,
I have an application that uses the following Windows APIs. HANDLE CreateFileMapping( HANDLE hFile, LPSECURITY_ATTRIBUTES lpFileMappingAttributes, DWORD flProtect, DWORD dwMaximumSizeHigh, DWORD dwMaximumSizeLow, LPCTSTR lpName ); LPVOID WINAPI MapViewOfFile( __in HANDLE hFileMappingObject, __in DWORD dwDesiredAccess, __in DWORD dwFileOffsetHigh, __in DWORD dwFileOffsetLow, __in SIZE_T dwNumberOfBytesToMap ); I need to reprogram this application to run on Linux. Is mmap function a good replacement for the above two API calls. If not please suggest an alternative method. Thanks and Regards |
You might be better off asking this in the programming forum
http://www.linuxquestions.org/questions/programming-9/ |
You can ask the Mods to move it by reporting your own post.
|
When using mmap you should be aware that some hosting server service providers (Hostmonster for example) have mmap disabled on their systems. So if your application has to run as some CGI tool on such a server, then you first need to check if mmap is there. A possible workaround is to compile a static application on a similar system. It will be difficult if you have (for example) no 64 bit system locally and you need to compile on the remote server, which is 64-bit and where mmap is not supported.
Debian |
All times are GMT -5. The time now is 04:36 PM. |