From: ko1@... Date: 2018-09-09T15:50:34+00:00 Subject: [ruby-core:88926] [Ruby trunk Feature#15095] [PATCH] share VM stack between threads and fibers if identical Issue #15095 has been updated by ko1 (Koichi Sasada). normalperson (Eric Wong) wrote: > Also, why cast in ec_set_vm_stack? > https://80x24.org/spew/20180909080140.16293-1-e@80x24.org/raw > I've barely touched code this week, so maybe I forgot something :x Yes. These fields were `const` at least on my laptop to modify something. ---------------------------------------- Feature #15095: [PATCH] share VM stack between threads and fibers if identical https://bugs.ruby-lang.org/issues/15095#change-73962 * Author: normalperson (Eric Wong) * Status: Open * Priority: Normal * Assignee: ko1 (Koichi Sasada) * Target version: ---------------------------------------- ec->vm_stack is always allocated with malloc, so stacks for root fiber (thread stack) and non-root fibers can be shared as long as the size is the same. The purpose of this change was mainly to reduce dependencies on ROOT_FIBER_CONTEXT, but it makes sense to share reusable data as much as possible, regardless. Will commit in a day or two (part of plan for [Bug #15050]). Long term, I think it makes sense to get rid of distinction between "thread" and "fiber" stacks, because every thread has a (root) fiber, anyways. ---Files-------------------------------- 0001-share-VM-stack-between-threads-and-fibers-if-identic.patch (4.15 KB) -- https://bugs.ruby-lang.org/ Unsubscribe: