Eval creates modules on-the-fly. These modules are never removed from the code server.
Another trivial optimization would be to generate the module names used by eval based off the current pid, rather than off a timestamp.
Calling eval ~65,000 times crashes the code server:
erl_crash_dump:0.1
Tue Oct 5 14:42:35 2010
Slogan: no more index entries in module_code (max=65536)
System version: Erlang R14B (erts-5.8.1) [source] [smp:2:2] [rq:2] [async-threads:0] [hipe] [kernel-poll:true]
Eval creates modules on-the-fly. These modules are never removed from the code server.
Another trivial optimization would be to generate the module names used by eval based off the current pid, rather than off a timestamp.
Calling eval ~65,000 times crashes the code server: