暴力测试:
#include <iostream>
using namespace std;
void fun()
{
int *p = new int(10);
}
int main()
{
while(1)
{
fun();
}
}
系统日志查看:
grep "Out of memory" /var/log/messages
待研究:
上面的程序的退出码是多少?
暴力测试:
#include <iostream>
using namespace std;
void fun()
{
int *p = new int(10);
}
int main()
{
while(1)
{
fun();
}
}
系统日志查看:
grep "Out of memory" /var/log/messages
待研究:
上面的程序的退出码是多少?