Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

15
  • I am just running a browser and a terminal, and I have close on 200 processes. You want to reserve 800 GB before I run any applications? Also, data on stack is transient -- it lasts only while the function that declared the data object is in scope. It can be done (ALGOL had no heap) but it was very constraining. On the other hand, my first mainframe had no stack. Commented Oct 12, 2021 at 8:56
  • "You want to reserve 800 GB before I run any applications?" Yes - 800GB of virtual memory. There's no issue with that on 64-bit machines. Commented Oct 12, 2021 at 9:43
  • @ilkkachu: std::vector<> always stores its data on the heap. Only a pointer to the data and the size/capacity counters are stored on the stack. Commented Oct 12, 2021 at 9:44
  • 3
    Some consider 8MiB to be huge ;-) Commented Oct 12, 2021 at 10:25
  • 1
    "using recursive algorithms instead of iterative" it only makes sense to use "recursive algorithms" with a language with mandatory tail-call elimination, like scheme. "Yes - 800GB of virtual memory. There's no issue with that on 64-bit machines" by that you're forcing the kernel to horribly overcommit, and when actual memory gets tight, the kernel won't be able to determine which commitments it should fullfill and which it should drop; the program which really needs to work with a large dataset at once, or the program whose author couldn't be bothered to learn how to program ;-) Commented Oct 12, 2021 at 18:09