<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ruby.git/include/ruby/st.h, branch v3_3_11</title>
<subtitle>The Ruby Programming Language</subtitle>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/'/>
<entry>
<title>Fix memory leak when copying ST tables</title>
<updated>2023-06-29T15:16:50+00:00</updated>
<author>
<name>Peter Zhu</name>
<email>peter@peterzhu.ca</email>
</author>
<published>2023-06-29T13:21:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=f0d08d11dcd404f3146c0d71d6ff743bbc6e7193'/>
<id>f0d08d11dcd404f3146c0d71d6ff743bbc6e7193</id>
<content type='text'>
st_copy allocates a st_table, which is not needed for hashes since it is
allocated by VWA and embedded, so this causes a memory leak.

The following script demonstrates the issue:

```ruby
20.times do
  100_000.times do
    {a: 1, b: 2, c: 3, d: 4, e: 5, f: 6, g: 7, h: 8, i: 9}
  end

  puts `ps -o rss= -p #{$$}`
end
```
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
st_copy allocates a st_table, which is not needed for hashes since it is
allocated by VWA and embedded, so this causes a memory leak.

The following script demonstrates the issue:

```ruby
20.times do
  100_000.times do
    {a: 1, b: 2, c: 3, d: 4, e: 5, f: 6, g: 7, h: 8, i: 9}
  end

  puts `ps -o rss= -p #{$$}`
end
```
</pre>
</div>
</content>
</entry>
<entry>
<title>Implement Hash ST tables on VWA</title>
<updated>2023-05-17T13:19:40+00:00</updated>
<author>
<name>Peter Zhu</name>
<email>peter@peterzhu.ca</email>
</author>
<published>2023-04-19T20:02:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=0938964ba1af3924cf969fb809fc3598892bc20d'/>
<id>0938964ba1af3924cf969fb809fc3598892bc20d</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Use an st table for "too complex" objects</title>
<updated>2023-03-20T20:54:18+00:00</updated>
<author>
<name>Aaron Patterson</name>
<email>tenderlove@ruby-lang.org</email>
</author>
<published>2023-03-17T18:29:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=54dbd8bea8a79bfcdefa471c1717c6cd28022f33'/>
<id>54dbd8bea8a79bfcdefa471c1717c6cd28022f33</id>
<content type='text'>
st tables will maintain insertion order so we can marshal dump / load
objects with instance variables in the same order they were set on that
particular instance

[ruby-core:112926] [Bug #19535]

Co-Authored-By: Jemma Issroff &lt;jemmaissroff@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
st tables will maintain insertion order so we can marshal dump / load
objects with instance variables in the same order they were set on that
particular instance

[ruby-core:112926] [Bug #19535]

Co-Authored-By: Jemma Issroff &lt;jemmaissroff@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix typos (#2958)</title>
<updated>2020-03-11T07:43:12+00:00</updated>
<author>
<name>K.Takata</name>
<email>kentkt@csc.jp</email>
</author>
<published>2020-03-11T07:43:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=e89ebdcb87f23a71ad97581541bb2eaeee5e83e9'/>
<id>e89ebdcb87f23a71ad97581541bb2eaeee5e83e9</id>
<content type='text'>
* Fix a typo

* Fix typos in st.[ch]</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Fix a typo

* Fix typos in st.[ch]</pre>
</div>
</content>
</entry>
<entry>
<title>st.c: Use rb_st_* prefix instead of st_* (#2479)</title>
<updated>2019-09-22T13:12:18+00:00</updated>
<author>
<name>Yusuke Endoh</name>
<email>mame@ruby-lang.org</email>
</author>
<published>2019-09-22T13:12:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=5f35b8ca30cba69968d4d0c885a4bf5c48b03e17'/>
<id>5f35b8ca30cba69968d4d0c885a4bf5c48b03e17</id>
<content type='text'>
The original st.c was public domain hash table implementation, but
Ruby's st.c is highly modified, and its data structure is not
compatiblie with the original one.

Therefore, when creating an extension library to wrap C code that uses
the original st.c, the symbols conflict, which leads to segfault.

This changes the prefix `st_*` of st.c functions to `rb_st_*` for
reflecting that they are specific to Ruby's, and avoid symbol conflicts.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The original st.c was public domain hash table implementation, but
Ruby's st.c is highly modified, and its data structure is not
compatiblie with the original one.

Therefore, when creating an extension library to wrap C code that uses
the original st.c, the symbols conflict, which leads to segfault.

This changes the prefix `st_*` of st.c functions to `rb_st_*` for
reflecting that they are specific to Ruby's, and avoid symbol conflicts.</pre>
</div>
</content>
</entry>
<entry>
<title>struct st_hash_type now free from ANYARGS</title>
<updated>2019-08-27T06:52:26+00:00</updated>
<author>
<name>卜部昌平</name>
<email>shyouhei@ruby-lang.org</email>
</author>
<published>2019-08-27T03:21:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=78628618da98236fc1bf702079185b36ed394e2a'/>
<id>78628618da98236fc1bf702079185b36ed394e2a</id>
<content type='text'>
After 5e86b005c0f2ef30df2f9906c7e2f3abefe286a2, I now think ANYARGS is
dangerous and should be extinct.  This commit adds function prototypes
for struct st_hash_type.  Honestly I don't understand why they were
commented out at the first place.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
After 5e86b005c0f2ef30df2f9906c7e2f3abefe286a2, I now think ANYARGS is
dangerous and should be extinct.  This commit adds function prototypes
for struct st_hash_type.  Honestly I don't understand why they were
commented out at the first place.
</pre>
</div>
</content>
</entry>
<entry>
<title>st_foreach now free from ANYARGS</title>
<updated>2019-08-27T06:52:26+00:00</updated>
<author>
<name>卜部昌平</name>
<email>shyouhei@ruby-lang.org</email>
</author>
<published>2019-08-26T07:06:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=6dd60cf114701f1ff3526381c0e742c588af2f91'/>
<id>6dd60cf114701f1ff3526381c0e742c588af2f91</id>
<content type='text'>
After 5e86b005c0f2ef30df2f9906c7e2f3abefe286a2, I now think ANYARGS is
dangerous and should be extinct.  This commit deletes ANYARGS from
st_foreach.  I strongly believe that this commit should have had come
with b0af0592fdd9e9d4e4b863fde006d67ccefeac21, which added extra
parameter to st_foreach callbacks.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
After 5e86b005c0f2ef30df2f9906c7e2f3abefe286a2, I now think ANYARGS is
dangerous and should be extinct.  This commit deletes ANYARGS from
st_foreach.  I strongly believe that this commit should have had come
with b0af0592fdd9e9d4e4b863fde006d67ccefeac21, which added extra
parameter to st_foreach callbacks.
</pre>
</div>
</content>
</entry>
<entry>
<title>Add `GC.compact` again.</title>
<updated>2019-04-20T01:19:47+00:00</updated>
<author>
<name>tenderlove</name>
<email>tenderlove@b2dd03c8-39d4-4d8f-98ff-823fe69b080e</email>
</author>
<published>2019-04-20T01:19:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=91793b8967e0531bd1159a8ff0cc7e50739c7620'/>
<id>91793b8967e0531bd1159a8ff0cc7e50739c7620</id>
<content type='text'>
🙏

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67620 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
🙏

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67620 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
</pre>
</div>
</content>
</entry>
<entry>
<title>Reverting compaction for now</title>
<updated>2019-04-17T09:41:41+00:00</updated>
<author>
<name>tenderlove</name>
<email>tenderlove@b2dd03c8-39d4-4d8f-98ff-823fe69b080e</email>
</author>
<published>2019-04-17T09:41:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=744e5df7156c8bb3fea61bacb1bf27d3d8698548'/>
<id>744e5df7156c8bb3fea61bacb1bf27d3d8698548</id>
<content type='text'>
For some reason symbols (or classes) are being overridden in trunk

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67598 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
For some reason symbols (or classes) are being overridden in trunk

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67598 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
</pre>
</div>
</content>
</entry>
<entry>
<title>Adding `GC.compact` and compacting GC support.</title>
<updated>2019-04-17T03:17:25+00:00</updated>
<author>
<name>tenderlove</name>
<email>tenderlove@b2dd03c8-39d4-4d8f-98ff-823fe69b080e</email>
</author>
<published>2019-04-17T03:17:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=3c55b643aec09bbe779dab25b2397947eded2b9b'/>
<id>3c55b643aec09bbe779dab25b2397947eded2b9b</id>
<content type='text'>
This commit adds the new method `GC.compact` and compacting GC support.
Please see this issue for caveats:

  https://bugs.ruby-lang.org/issues/15626

[Feature #15626]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67576 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This commit adds the new method `GC.compact` and compacting GC support.
Please see this issue for caveats:

  https://bugs.ruby-lang.org/issues/15626

[Feature #15626]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67576 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
</pre>
</div>
</content>
</entry>
</feed>
