Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> Varnish allocate some virtual memory, it tells the operating system to back this memory with space from a disk file.

What's the special instruction to do this? Is this a low level C / syscall thing or do languages like Go have a disk-backed map implementation already?



I guess they are refering to mmap (https://man7.org/linux/man-pages/man2/mmap.2.html). In go you can use the mmap syscall directly (low level, not supported on all targets/OSs). I believe there are a few libraries that offer wrappers around the syscall/emulate the syscall if not available).


This sounds like a backwards description of mmap. This is probably what they're using on the backend. I'm not sure if Windows has this as a feature, but any unixy system will.


mmap on Windows is CreateFileMapping + MapViewOfFile




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: