Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set Memory Limit #80

Open
harshraj22 opened this issue Apr 24, 2020 · 1 comment
Open

Set Memory Limit #80

harshraj22 opened this issue Apr 24, 2020 · 1 comment
Labels
bug Something isn't working help wanted Extra attention is needed Intermediate Need good understanding of project and framework Priority Needs to be solved ASAP

Comments

@harshraj22
Copy link
Owner

harshraj22 commented Apr 24, 2020

  • Some good way needs to be found to limit the memory usage by a solution (some inbuilt way using python rather than copy-paste shell scripts from stackoverflow).
  • A simple buggy program like the following causes server to crash completely.
  • The programme should be terminated if it tries to use more memory than specified.
#include <bits/stdc++.h>
using namespace std;

const int N = 1e7;

void solve(){
    vector<int> v(N);
    solve();
}

int main(){
    solve();
    return 0;
}

Running User sumbitted codes in containarized environment might help. Google about docker.

@harshraj22 harshraj22 added bug Something isn't working help wanted Extra attention is needed Intermediate Need good understanding of project and framework Priority Needs to be solved ASAP labels Apr 24, 2020
@harshraj22 harshraj22 pinned this issue Apr 24, 2020
@harshraj22
Copy link
Owner Author

💡 Have a look on sandboxing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed Intermediate Need good understanding of project and framework Priority Needs to be solved ASAP
Projects
None yet
Development

No branches or pull requests

1 participant