logoalt Hacker News

debugnik • today at 6:54 AM • 1 reply • view on HN

Aren't madvise and mincore the APIs you want?


Replies

masklinn • today at 8:34 AM

Probably more mlock (keep memory area in RAM), mincore just tells you what is or is not in RAM, and madvise is about access patterns.

You could MADV_WILLNEED the GC metadata when you start the GC process hoping they’ll have been paged in by the time you STW, but assuming that area is not massive it’s probably a better idea to just prevent it being paged out.

➕ show 1 reply