JM Project

JM プロジェクトは、主に Linux 関連のマニュアルページの日本語ページを翻訳・公開しています。

Linux マニュアル 一覧

全文・高度検索

per page, with , order by , clip by
Results of 1 - 2 of about 2 for numBlocks (0.001 sec.)
Man page of MALLINFO 11228
MALLINFO Section: Linux Programmer's Manual (3) Updated: 2020-11-01 Index JM Home Page 名前 mallinfo - メモリー割り当て情報を取得する 書式 #include < malloc.h > struct mallinfo mallinfo(void); 説明 mallinfo () 関数は、 malloc (3) や一連の関 ... epcost): %d\n", mi.keepcost); } int main(int argc, char *argv[]) { #define MAX_ALLOCS 2000000 char *alloc[MAX_ALLOCS]; int numBlocks, freeBegin, freeEnd, freeStep; size_t blockSize; if (argc < 3 || strcmp(argv[1], "--help") == 0) { fprintf(stderr, "%s num ... -blocks block-size [free-step " "[start-free [end-free]]]\n", argv[0]); exit(EXIT_FAILURE); } numBlocks = atoi(argv[1]); blockSize = atoi(argv[2]); freeStep = (argc > 3) ? atoi(argv[3]) : 1; freeBegin = (argc > 4) ? atoi(argv[ ... 4]) : 0; freeEnd = (argc > 5) ? atoi(argv[5]) : numBlocks; printf("============== Before allocating blocks ==============\n"); display_mallinfo(); for (int j = 0; j < numBlocks; j+ ...
https://man.mtool.work/man/20261015/man3/mallinfo.3.html
Man page of MALLOC_INFO 7485
MALLOC_INFO Section: Linux Programmer's Manual (3) Updated: 2020-11-01 Index JM Home Page 名前 malloc_info - malloc の状態をストリームに出力する 書式 #include < malloc.h > int malloc_info(int options , FILE * stream ); 説明 malloc_info () 関 ... dlib.h > #include < pthread.h > #include < malloc.h > #include < errno.h > static size_t blockSize; static int numThreads, numBlocks; #define errExit(msg) do { perror(msg); exit(EXIT_FAILURE); \ } while (0) static void * thread_func(void *arg) { int tn = ... + tn)' ensures that each thread (including the main thread) allocates a different amount of memory */ for (int j = 0; j < numBlocks; j++) if (malloc(blockSize * (2 + tn)) == NULL) errExit("malloc-thread"); sleep(100); /* Sleep until main thread terminate ... stderr, "%s num-threads num-blocks block-size [sleep-time]\n", argv[0]); exit(EXIT_FAILURE); } numThreads = atoi(argv[1]); numBlocks = atoi(argv[2]); blockSize = atoi(argv[3]); sleepTime = (argc > 4) ? atoi(argv[4]) : 0; pthread_t *thr = calloc(numThreads ...
https://man.mtool.work/man/20261015/man3/malloc_info.3.html
PREV 1 NEXT

リンク

日本語の文書やマニュアルを配布している個人/プロジェクトへのリンクです。