We don't want to allocate many keys... I think I remember a discussion that the Isolate can keep a map of per-thread data specific to the isolate, perhaps just a hash map by thread id.. Once thread enters the isolate, it can get some tls slots initialized from that isolate if needed, using same global keys. I think.
On Tue, Jun 15, 2010 at 4:31 PM, Luke Zarko <[email protected]> wrote: > It looks like there are up to four different TLS keys in current use: two > in v8threads (thread_state_key, thread_id_key); one in execution > (stack_limit_key); and one in simulator-arm (simulator_key). Are these going > to disappear when we move their functions into Isolate (where we'll have to > do some sort of indexing based on thread IDs ourselves?) If not and we > simply move the keys as we're moving other data, then for every isolate we > might be trying to allocate five more TLS slots. MSDN holds that the maximum > number of TLS keys per process on Windows is 1088-- they don't come cheap. > Thoughts? > > Luke > -- v8-dev mailing list [email protected] http://groups.google.com/group/v8-dev
