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

> I was having some fun recently just seeing how fast we can allocate large chunks of memory.

How did you measure that? What was fastest? I'd imagine sbrk is faster than mmap, but I haven't checked. If you're on Linux, then doing a virtual memory allocation will not cause the memory to have physical representation. Did you populate the pages through looping? Or did you use MAP_POPULATE?

I saw that madvise was going to get MADV_POPULATE_(READ|WRITE) in the Linux kernel mailing lists back in 2021, but I haven't seen it on the kernels that I use (5.4, 5.15)



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

Search: