Code Monkey home page Code Monkey logo

Comments (2)

HeRaNO avatar HeRaNO commented on June 1, 2024 1

今天重新测试了一下,不用 Arbiter 的情况如下:

1

Arbiter 的配置如下:

2

直接在 GUI 下启动的情况下挂掉了

3

result 文件如下

4

可能之前写了尾递归,但是之前测试我没有开 -O2,看了一下汇编不会优化,挺怪的。但是这个测试应该比较有代表性。

开了栈之后就 OK 了

5

from oi-wiki.

ranwen avatar ranwen commented on June 1, 2024

感谢您的反馈,但是我现在已经AFO了😇。

我这个commit确实是在上古版本的NOI Linux下做的,当时评测如果不这么跑的话确实是会RE的。但现在NOI Linux更新了,我也不清楚他是怎么搞的,我也不想再下一个NOI Linux去检查这个问题了。

方便的话,欢迎您自己提交一个PR来修改这个描述。

关于如何验证这个情况,您可以做一下这些测试:

在终端中直接运行这个程序,观测是否会segmentation fault。确定这个程序是否本身就是会使用大量栈的。注意保持编译选项一致,避免编译器优化影响结果(例如可能进行的尾递归优化)。(我不清楚能不能直接使用arbiter编译出来的程序,可以的话直接用是更好的)

在终端中输入 ulimit -s,程序会输出当前环境下允许使用的栈大小。用这个命令可以检查一下NOI Linux是否是改了默认栈设置,使得所有程序都可以直接跑而不会爆栈。我本地WSL会返回8192,对应8M的默认值。

from oi-wiki.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.