コミット済みメモリとは何か。メモリ使用量と何が違うのか。(Windows) – やや低レイヤー研究所
#include <stdio.h> #include <windows.h> int main() { const int MALLOC_SIZE = 1024L * 1024 * 1024; // 1 GB // プログラム起動 printf("プログラム起動。[Enter] キーで継続。\n"); getchar(); // メモリ確保 char *p = (char *)malloc(MALLOC_SIZE); if (p == NULL) { printf("メモリ確保失敗。\n"); ...
yaya.lsv.jp