Hacker News new | past | comments | ask | show | jobs | submit login

Just wanted to observe that there's no need to stress about allocating exactly the amount of physical memory you'll need in memfd_create(). Linux will always allocate pages on-demand (regardless of overcommit settings), so any unused virtual memory costs you essentially nothing. Given that, you should feel free to allocate at least several GB in a memfd (I've actually done this with 32TB, but that large an amount can conflict with overcommit policy, which you may or may not have control over). In general (for 64-bit address spaces) you should never need to worry about reallocating a memfd based on the amount of physical memory you need.



Consider applying for YC's Spring batch! Applications are open till Feb 11.

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

Search: