[#114703] [Ruby master Bug#19875] Ruby 2.7 -> 3.1 Performance regression in String#count — "iz (Illia Zub) via ruby-core" <ruby-core@...>

Issue #19875 has been reported by iz (Illia Zub).

18 messages 2023/09/12

[#114774] [Ruby master Feature#19884] Make Safe Navigation Operator work on classes — "p8 (Petrik de Heus) via ruby-core" <ruby-core@...>

Issue #19884 has been reported by p8 (Petrik de Heus).

13 messages 2023/09/15

[#114796] [Ruby master Feature#19889] Let `Kernel.#require` search for files relative to the current working directory for non ./, ../ relative paths — "sawa (Tsuyoshi Sawada) via ruby-core" <ruby-core@...>

Issue #19889 has been reported by sawa (Tsuyoshi Sawada).

6 messages 2023/09/18

[#114803] [Ruby master Bug#19890] File#realine(chomp: true) slower/more allocations than readline.chomp! — "segiddins (Samuel Giddins) via ruby-core" <ruby-core@...>

Issue #19890 has been reported by segiddins (Samuel Giddins).

12 messages 2023/09/18

[#114817] [Ruby master Bug#19892] Build failure with 8f1b688177 — "vo.x (Vit Ondruch) via ruby-core" <ruby-core@...>

Issue #19892 has been reported by vo.x (Vit Ondruch).

8 messages 2023/09/19

[#114915] [Ruby master Feature#19905] Introduce `Queue#peek` — "hi@... (Joao Fernandes) via ruby-core" <ruby-core@...>

Issue #19905 has been reported by hi@joaofernandes.me (Joao Fernandes).

8 messages 2023/09/28

[ruby-core:114676] [Ruby master Misc#19870] Why is a long-run thread allocated more memory than a short-run one?

From: "nobu (Nobuyoshi Nakada) via ruby-core" <ruby-core@...>
Date: 2023-09-10 12:56:28 UTC
List: ruby-core #114676
Issue #19870 has been updated by nobu (Nobuyoshi Nakada).

Status changed from Open to Feedback

1048936 - 360 = 1048576 = 0x100000
A terminated thread no longer keeps its stack area.


----------------------------------------
Misc #19870: Why is a long-run thread allocated more memory than a short-run one?
https://bugs.ruby-lang.org/issues/19870#change-104505

* Author: caracal (Taishi Kasuga)
* Status: Feedback
* Priority: Normal
----------------------------------------
I want to write multithreading programing in Ruby but I found the following memory consumptions.

```
$ irb
irb(main):001> require 'objspace'
=> true
irb(main):002> t1 = Thread.new {}
=> #<Thread:0x00007f9237a74b28 (irb):2 run>
irb(main):003> t2 = Thread.new { sleep 6000 }
=> #<Thread:0x00007f9237b4f1d8 (irb):3 run>
irb(main):004> t3 = Thread.new { loop { sleep 5 } }
=> #<Thread:0x00007f9237b6d840 (irb):4 run>
irb(main):005> ObjectSpace.memsize_of(t1)
=> 360
irb(main):006> ObjectSpace.memsize_of(t2)
=> 1048936
irb(main):007> ObjectSpace.memsize_of(t3)
=> 1048936
irb(main):008>
```

Is the above behavior legitimate?



-- 
https://bugs.ruby-lang.org/
 ______________________________________________
 ruby-core mailing list -- ruby-core@ml.ruby-lang.org
 To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org
 ruby-core info -- https://ml.ruby-lang.org/mailman3/postorius/lists/ruby-core.ml.ruby-lang.org/

In This Thread

Prev Next