hiboma.hatenadiary.jp sysctl vm.drop_caches=1 㯠mmap(2) ãã¦ãããã¡ã¤ã«ã®ãã¼ã¸ãã£ãã·ã¥ãç ´æ£ãããã¨ã¯ã§ããªãã£ãããä»ã«ã¯ã©ãããæ¹æ³ããããã ã£ã? ( ä½ãå°ã£ã¦ããã±ã¼ã¹ãããããã§ãªãã¦æåã確ããããã¨ããèå³ã»é¢å¿ã§èª¿ã¹ã¦ãã ) memory pressure ãããã 1. 大ããªç¡åãã¼ã¸ããã¤ããã»ã¹ãä½ã ãã¹ãã® RAM ã¨åç¨åº¦ã®ç¡åãã¼ã¸ã使ãããã»ã¹ãä½ãã°ããã¼ã¸ãã£ãã·ã¥ã追ãåºãã ( reclaim ãããã¨æ¸ããæ¹ãæ£ç¢ºã ããã ) #include <stdlib.h> int main() { long size = 1L * 4 * 1024 * 1024 * 1024; char *p = malloc(size); for ( long i = 0; i < size; i +=
{{#tags}}- {{label}}
{{/tags}}