Project

General

Profile

Actions

Feature #14487

closed

[PATCH] simplify altstack and enable reuse with thread cache

Added by normalperson (Eric Wong) about 6 years ago. Updated about 6 years ago.

Status:
Closed
Assignee:
-
Target version:
-
[ruby-core:85621]

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

Actions #1

Updated by normalperson (Eric Wong) about 6 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]

Actions

Also available in: Atom PDF

Like0
Like0