Closed Bug 417450 Opened 12 years ago Closed 11 years ago

Investigate implementation of memory mapping on OS/2


(NSPR :: NSPR, enhancement)

Not set


(Not tracked)



(Reporter: mozilla, Assigned: wtc)


Seeing the discussion in bug 412796 I wonder if we should finally implement the memory mapping stuff on OS/2.

There are some ideas at on how that could be done (the author grants free use without limitations). The only problem is that the article doesn't have the code of the library attached to it any more...

Other implementations to guide this would be at and
Ah, found the link for the library in an old newsgroup posting (MID  0Wpe3JvzLE6N-pn2-rV1MxvQ5yIzb@sweethome to group ) and there the correct link is given: <> contains the two source files and the test program from the article.
OK, copied the library into os2misc.c for first testing and it at least compiles with GCC. The demo program in the source package also compiles and seems to work fine.

Now I have to see what the NSPR functions are actually supposed to do and if that can be done using the MMF API as provided by that library. The docs for the functions are here:
Christian Langanke reported to me, that the original version of the
MMF funcs was not tread-safe. He implemented that and also reformatted
the code. See the Workplace Shell Toolkit sources on (or
the NEPMD sources). They appear stable to me.

I describe here the procedure to get the files, because currently the project pages miss the info about the pserver string:

   cvs -d:pserver:<user> login
   cvs -d:pserver:<user> co .
   (Use guest/readonly for <user>/<password>.)

The MMF funcs are to be found in .\source\lib\wtkmmf.c

See also the documentation in .\source\book\ or better the
INF file in <> or in the
binary distribution <>.

Thanks for the hint, Andreas!

Unfortunately, that code is licensed LGPL and so cannot be directly used in NSPR/Mozilla (and linking against another library that is not guaranteed to be on a user's system is something I really don't want to do). But if I have time again to look at this, I will ask Christian if he can accommodate the license to be useful for us.
I'm not sure it has what would be needed for Mozilla but on Yuri Dario's site:
We won't get real memory mapping (this is because the available implementations apparently have problems with threading or are just not suitable for NSPR/Mozilla), but a simple, read-only read-file-into-memory-workaround is being implemented in bug 510705. 

So this one is WONTFIX.
Closed: 11 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.