Nicholas Clark <nick@ccl4.org> wrote: :A single block is likely actually smaller (due to per-block malloc overhead) :and its cache locality might be slightly better. Steady state (which is :really what we need to worry about) there won't be any moving of the stack, :because it will grow to the maximum transient size needed. : :(OK, except for crazy deep recursive code that doesn't have a consistent :idea of how far down the rabbit hole it needs to go) Hey, that's me. :) Maybe not steady state, but I don't think even this is a problem as long as we increase the stack exponentially, and not just "what we need plus maybe a constant extra". If we grow the stack by a constant factor c > 1 each time, total bytes moved over the lifetime of the program will be (I think) around maxsize / (c - 1). It's only the granularity that could still cause an issue, but I think crazy deep recursive code would not usually care if one particular subroutine entry costs a bunch more microseconds than another as long as amortized cost is low: that's more the preserve of responsive GUI code, interrupt handlers and benchmarks. HugoThread Previous | Thread Next