-
Notifications
You must be signed in to change notification settings - Fork 19
Open
Description
In lrun, is memory measurement based on stack or heap? It feels like lrun doesn't check the stack memory.
The reason for this was that there was no difference in the amount of memory used, even though the arrangement was large for the CPP-code.
before
#include <bits/stdc++.h>
using namespace std;
typedef long long LL;
priority_queue Q;
int main() {
int a, b;
cin >> a >> b;
cout << a + b;
for (int i = 1; i <= 10000000; i++) {
Q.push(i);
}
return 0;
}
after
#include <bits/stdc++.h>
using namespace std;
typedef long long LL;
LL D1[10000][10000];
priority_queue Q;
int main() {
int a, b;
cin >> a >> b;
cout << a + b;
for (int i = 1; i <= 10000000; i++) {
Q.push(i);
}
return 0;
}
The memory measurements for the above two codes were the same.
Metadata
Metadata
Assignees
Labels
No labels