× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.


  • Subject: how does mmap() work?
  • From: "Steve Richter" <srichter@xxxxxxxxxxxxx>
  • Date: Tue, 22 May 2001 11:51:51 -0400

hola,
 
What I think I know:
 
The mmap( ) function is used to map a stream file into memory.
 
The func rcvs an offset into the file and the length of bytes to be mapped. It returns a ptr to the start of the mapped memory.
    char* pData ;
    dword nNbrBytesToMap = 17Meg ;
    pData = mmap( NULL, nNbrBytesToMap, , , FileHandle, OfsIntoFile ) ;
 
The ptr can then be used to write to the stream file:
    pData[17,000,000] = 'x' ;  /* copies 'x' to offset 17 million into the stream file */
 
Multiple jobs can map the same stream file at the same time. The end result being a perm shared space that exceeds the 16 mem space size limit.
 
My questions:
 
How is mapped memory implemented? 
 
What chgs to the architecture, virtual memory manager were needed to be able to do this?
 
Are teraspaces implemented the same way?
 
 
Just asking,
 
Steve Richter
 

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.