Expand dump-functions for excluding user/unused memory (This is rebase commit for merging to development)

This commit is contained in:
Katsuya Horigome
2017-08-02 10:29:10 +09:00
committed by Ken Sato
parent 325082a571
commit a05b6e1ba8
171 changed files with 11516 additions and 1615 deletions

View File

@ -0,0 +1,30 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/mman.h>
#define MEM_SIZE (1024*1024*20)
#define LOOP_MAX 1024
#define SLEEP_TIME 30
main()
{
int *buf,buf_size,index;
buf_size = MEM_SIZE;
for (index = 0; index < LOOP_MAX; index++) {
buf = mmap(0, buf_size, PROT_READ|PROT_WRITE, MAP_ANONYMOUS|MAP_PRIVATE, -1, 0);
if (NULL != buf) {
memset(buf, 1, buf_size);
} else {
printf("[%d] mmap error!!! buf_size:%d(0x%x)\n", index, buf_size, buf_size);
}
}
printf("mmap is done\n");
sleep(SLEEP_TIME);
return 0;
}