Your program compiles and runs fine on a couple of my servers.
The default memory allocation for a C++ compile is 500 MB and for the subsequent run is 200 MB. I experimented a bit and I can compile that program with virtual memory reduced to 10 MB. Something is broken badly somewhere.
What's the output if you run the following C++ program from within CodeRunner?
The default memory allocation for a C++ compile is 500 MB and for the subsequent run is 200 MB. I experimented a bit and I can compile that program with virtual memory reduced to 10 MB. Something is broken badly somewhere.
What's the output if you run the following C++ program from within CodeRunner?
#include <iostream>
int main() {
system("bash -c 'g++ --version; ulimit -a'");
return 0;
}
On my system the output is
g++ (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0
Copyright (C) 2019 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
core file size (blocks, -c) 0
data seg size (kbytes, -d) unlimited
scheduling priority (-e) 0
file size (blocks, -f) 20000
pending signals (-i) 63673
max locked memory (kbytes, -l) 64
max memory size (kbytes, -m) unlimited
open files (-n) 8192
pipe size (512 bytes, -p) 8
POSIX message queues (bytes, -q) 819200
real-time priority (-r) 0
stack size (kbytes, -s) 8192
cpu time (seconds, -t) 6
max user processes (-u) 21
virtual memory (kbytes, -v) 200000
file locks (-x) unlimited
Also ... have you had any other issues running C++ programs? Does the problem only occur when compiling? Does it compile and run OK if the regex is a local variable of main?