[MLton-devel] Direct memory access / Memory mapping
Michael Neumann
uu9r@rz.uni-karlsruhe.de
Fri, 28 Jun 2002 14:23:17 +0200
Hi,
Is there a function/primitive in MLton which can be used to access memory
direclty by passing it the address?
E.g.
Memory.getChar : word32 -> char
Memory.getWord32 : word32 -> word32
Or something like OCaml's bigarray library, where you can make a C-array
accessable from OCaml (note that the C-array is not garbage-collected).
I need to memory-map a large file into memory (I can do this easily in a C-extension).
Then I would need another C-funtion that accesses the memory.
But calling each time a C-function to access a single byte might be to much overhead, compared
to a few inlined machine instructions.
Any suggestions?
Regards,
Michael
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Caffeinated soap. No kidding.
http://thinkgeek.com/sf
_______________________________________________
MLton-devel mailing list
MLton-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mlton-devel