Feature #14487
closed[PATCH] simplify altstack and enable reuse with thread cache
Description
simplify altstack and enable reuse with thread cache
Instead of allocating and registering the altstack in different
places, do it together to reduce code and improve readability.
When thread cache is enabled, storing altstack in rb_thread_t
is wasteful and we may reuse altstack in the same pthread.
This also lets us clearly allow use of xmalloc to allow GC to
recover from ENOMEM.
This seems straighforward and will commit soonish if no objections.
(Still working on improving + benchmarking thread cache; hardware sucks :<)
Files
Updated by normalperson (Eric Wong) about 7 years ago
- Status changed from Open to Closed
Applied in changeset trunk|r63213.
simplify altstack and enable reuse with thread cache
Instead of allocating and registering the altstack in different
places, do it together to reduce code and improve readability.
When thread cache is enabled, storing altstack in rb_thread_t
is wasteful and we may reuse altstack in the same pthread.
This also lets us clearly allow use of xmalloc to allow GC to
recover from ENOMEM.
[ruby-core:85621] [Feature #14487]