Ian Rogers wrote:
> the attached patch modifies ThreadLocal to use an array of Objects hung
> off Thread rather than a weak hash map hung off Thread. On DaCapo's
> Jython benchmark this can improve the performance of the Jikes RVM by
> more than 10%. It also improves other DaCapo benchmark performance. GCJ
> already has a similar mechanism to use pthread thread locals.

This patch looks wrong to me:

1) Values are strongly reachable, which means they potentially won't be garbage 
collected.
2) Value slots are reused without clearing them, which means potential security 
hole.

Regards,
Jeroen


Reply via email to