You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
It uses cgroup's memory counter. I think it might be counting page faults. Writing to heap or stack both cause page faults and are counted. Do you expect stack and heap to be counted differently?
It uses cgroup's memory counter. I think it might be counting page faults. Writing to heap or stack both cause page faults and are counted. Do you expect stack and heap to be counted differently?
Oh, I see..... This program seems to check the stack memory of the array D1 normally. Thank you.
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
after
The memory measurements for the above two codes were the same.
The text was updated successfully, but these errors were encountered: