diff options
author | Étienne Barrié <[email protected]> | 2025-04-28 11:53:49 +0200 |
---|---|---|
committer | Jean Boussier <[email protected]> | 2025-05-06 19:13:59 +0200 |
commit | cb772247e72ce3d3c7718018539508b0204c1f2c (patch) | |
tree | f01a550cd11dd57455f7e3116892363952cdd224 /include/ruby/internal/core/robject.h | |
parent | 925da368763487c495f47c9e7f17a252ff38a105 (diff) |
Improve correctness contention for allocated object counts
Currently the count of allocated object for a heap is incremented
without regards to parallelism which leads to incorrect counts.
By maintaining a local counter in the ractor newobj cache, and only
syncing atomically with some granularity, we can improve the correctness
without increasing contention.
The allocated object count is also synced when the ractor is freed.
Co-authored-by: Jean Boussier <[email protected]>
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/13192
Diffstat (limited to 'include/ruby/internal/core/robject.h')
0 files changed, 0 insertions, 0 deletions