Anonymous mmap in the runtime unsupported in openmvs environment
吴佳森 <[email protected]> Thu, 18 Apr 2013 13:28:25 +0800
| Newsgroups | gmane.comp.lang.ml.mlton.devel |
|---|---|
| Message-ID | <CAKCzkEq6JLNELF6KS30z1ioF_47MwWoW3TAjd6vZfF7f_W0P3g@mail.gmail.com> |
Hi. I'm doing some experiments on mlton runtime. I am trying to port it S390 openmvs environment. Openmvs is a minimum unix-like environment. Almost everything goes well, but the platform-dependent parts fail. The GC_mmapAnon() cannot be implement. I looked up the mmap in C runtime library manual on openmvs and found out that the MAP_ANON is not supported. I also tried some workarounds such as using MAP_PRIVATE with /dev/zero, but it's also not supported. GC_mmapAnon(), GC_remmap() and GC_munmap() has similar functionality as malloc(), realloc() and free(). Can I just implement GC_mmapAnon() with malloc(), by ignoring the first parameter (which is a suggested location of storage allocation)? Will there be anything particular to consider about? GC_mmapAnon() seems to be the interface to obtain a piece of memory in createHeap(). There is a piece of code with loop to find a location where storage request can be satisfied by mmap. But I cannot see the reason that mmap() be better than something like a direct malloc. Could someone help me on this? Thank you very much. Jason Ng. ------------------------------------------------------------------------------ Precog is a next-generation analytics platform capable of advanced analytics on semi-structured data. The platform includes APIs for building apps and a phenomenal toolset for data science. Developers can use our toolset for easy data analysis & visualization. Get a free account! http://www2.precog.com/precogplatform/slashdotnewsletter _______________________________________________ MLton-devel mailing list [email protected]; [email protected] https://lists.sourceforge.net/lists/listinfo/mlton-devel