Skip to content

memory check of lrun #36

@drwolf1999

Description

@drwolf1999

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

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions