reid.kleckner at gmail.com
Mon Aug 9 11:05:42 PDT 2010
So just to try to sum up, the goal of this kind of change is to reduce
long-term heap usage in applications that JIT code once at startup,
and then enter a steady state of doing work. Think of server
applications written in any JITed language, or the finance
applications I keep seeing pop up on this list.
I would say that LLVM sees the *most* use as a static, ahead-of-time
compiler, where code generation occurs continously throughout the
process's life until it exits. In that kind of application, I would
presume that malloc is preferable to mmap, for all of the reasons that
Jakob described, ie avoiding address space fragmentation, avoiding
heavy-weight system calls, and (in the future, maybe?) multi-threaded
What I'm asking is whether it's worth adding code to LLVM to support
reducing memory usage for applications with the first use case.
More information about the llvm-dev