Hacker News new | ask | show | jobs
by okanat 109 days ago
I guess the author didn't use that many other programming languages or OSes. You can do the same even in garbage collected languages like Java and C# and on Windows too.

https://docs.oracle.com/javase/8/docs/api/java/nio/MappedByt...

https://learn.microsoft.com/en-us/dotnet/api/system.io.memor...

https://learn.microsoft.com/en-us/windows/win32/memory/creat...

Memory mapping is very common.

3 comments

mmap is a built-in module on python! Also true for perl.
I'd be careful though, as they all have quirks due to how tricky it is handling mmap faults. The Java API mentions both unique garbage collection behavior and throwing unspecified exceptions at unspecified times.
And since Java 4 no less.