Test "Process swap (swapout)" on arm64

Change-Id: I1eecb046575480966febbcb55e5f4ade6313275b
This commit is contained in:
Shiratori, Takehiro
2019-03-12 16:22:24 +09:00
committed by Masamichi Takagi
parent e988bfaf50
commit fe53c6e0a5
8 changed files with 175 additions and 8 deletions

View File

@@ -0,0 +1,14 @@
## qlmpilib_bufsize.patch COPYRIGHT FUJITSU LIMITED 2019 ##
diff --git a/executer/user/qlmpilib.c b/executer/user/qlmpilib.c
index 7fcbcb56..78c1f846 100644
--- a/executer/user/qlmpilib.c
+++ b/executer/user/qlmpilib.c
@@ -15,7 +15,7 @@
#include "../include/pmi.h"
-#define BUF_SIZE (32*1024)
+#define BUF_SIZE (128*1024)
#define NALLOC 10
#define QL_SUCCESS 0
#define QL_NORMAL 2

View File

@@ -0,0 +1,33 @@
## swaptest_bufsize_malloccount.patch COPYRIGHT FUJITSU LIMITED 2019 ##
diff --git a/test/user_space/swapout/swaptest.c b/test/user_space/swapout/swaptest.c
index 3c48446f..5638b6da 100644
--- a/test/user_space/swapout/swaptest.c
+++ b/test/user_space/swapout/swaptest.c
@@ -4,14 +4,14 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#define BUF_SIZE (32*1024)
+#define BUF_SIZE (128*1024)
int data[1024*1024];
char sym2[1024*1024] = { 10, 20, 30, 0 };
char sym3[1024*1024] = { 10, 20, 30, 0 };
char *sym1 = "aaaaaa";
char buffer[BUF_SIZE];
-char *ptr1, *ptr2;
+char *ptr1, *ptr2, *ptr3, *ptr4, *ptr5, *ptr6;
char fnamebuf[1024];
int
@@ -54,6 +55,10 @@ main(int argc, char **argv)
printf("&cc = %p\n", &cc);
ptr1 = malloc(1024);
ptr2 = malloc(1024*1024);
+ ptr3 = malloc(1024*1024);
+ ptr4 = malloc(1024*1024);
+ ptr5 = malloc(1024*1024);
+ ptr6 = malloc(1024*1024);
printf("ptr1 = %p\n", ptr1);
printf("ptr2 = %p\n", ptr2);
sprintf((char*) data, "hello\n");