Go Back   FileForums > Game Backup > PC Games > PC Games - CD/DVD Conversions > Conversion Tutorials

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 05-05-2023, 01:52
Junior53's Avatar
Junior53 Junior53 is offline
Registered User
 
Join Date: May 2023
Location: Sri Lanka
Posts: 25
Thanks: 23
Thanked 32 Times in 10 Posts
Junior53 is on a distinguished road
Question Can someone explain what this is used for and what is filemapping?

Code:
function CreateFileMapping(
  File: Cardinal; Attributes: Cardinal; Protect: Cardinal;
  MaximumSizeHigh: Cardinal; MaximumSizeLow: Cardinal; Name: PAnsiChar): Cardinal;
  external '[email protected] stdcall';
  
function MapViewOfFile(
  FileMappingObject: THandle; DesiredAccess: Cardinal; FileOffsetHigh: Cardinal;
  FileOffsetLow: Cardinal; NumberOfBytesToMap: Cardinal): PChar;
  external '[email protected] stdcall';
What is FileMapping & benefits of FileMapping?

File mapping is a technique that allows you to map the contents of a file into the virtual memory space of a process. This allows you to access the contents of the file as if it were in memory, rather than on disk.
There are several benefits to using file mapping:

• Performance: File mapping can improve the performance of file I/O operations by reducing the number of disk accesses. When you map a file into memory, the operating system can use its virtual memory management mechanisms to cache the contents of the file in memory. This means that subsequent accesses to the file can be satisfied from memory, rather than requiring a disk access.

• Concurrency: File mapping allows multiple processes to access the same file concurrently. When multiple processes map the same file into their virtual memory space, they can all access the contents of the file simultaneously. This can be useful for inter-process communication and data sharing.

• Ease of use: File mapping allows you to access the contents of a file using memory-mapped I/O operations, rather than traditional file I/O operations. This can make it easier to work with files, as you can use pointer arithmetic and other memory-based operations to manipulate the contents of the file.
Overall, file mapping is a powerful technique that can improve the performance and ease-of-use of file I/O operations. It is widely used in many different types of applications and is supported by most modern operating systems.

Last edited by Junior53; 07-06-2023 at 17:37. Reason: I found the answer myself :)
Reply With Quote
Sponsored Links
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
INNO TROUBLESHOOT - Tutorials and Answers about INNO Setup REV0 Conversion Tutorials 129 21-05-2021 05:51
INNO TUTORIAL - Using Unicode and ANSI Versions of INNO Setup REV0 Conversion Tutorials 51 26-03-2015 06:57
Frequently Asked Questions Joe Forster/STA PC Games - Frequently Asked Questions 0 29-11-2005 09:48



All times are GMT -7. The time now is 11:00.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
FileForums @ https://fileforums.com