aboutsummaryrefslogtreecommitdiffstats
path: root/gc.c
diff options
context:
space:
mode:
author卜部昌平 <shyouhei@ruby-lang.org>2019-11-18 12:13:08 +0900
committer卜部昌平 <shyouhei@ruby-lang.org>2019-11-19 12:36:19 +0900
commit0e8219f591f3f17cb7ee361e8a60dbef08145883 (patch)
tree89704f4d90521cf52ef1befc5e87429f8a9d5da3 /gc.c
parent78e266da1dede1c81e634982e76a129c5720d80e (diff)
downloadruby-0e8219f591f3f17cb7ee361e8a60dbef08145883.tar.gz
make functions static
These functions are used from within a compilation unit so we can make them static, for better binary size. This changeset reduces the size of generated ruby binary from 26,590,128 bytes to 26,584,472 bytes on my macihne.
Diffstat (limited to 'gc.c')
-rw-r--r--gc.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/gc.c b/gc.c
index 7803bace5b..899ca6bf32 100644
--- a/gc.c
+++ b/gc.c
@@ -1747,6 +1747,8 @@ heap_unlink_page(rb_objspace_t *objspace, rb_heap_t *heap, struct heap_page *pag
heap->total_slots -= page->total_slots;
}
+static void rb_aligned_free(void *ptr);
+
static void
heap_page_free(rb_objspace_t *objspace, struct heap_page *page)
{
@@ -2302,7 +2304,7 @@ rb_imemo_tmpbuf_new(VALUE v1, VALUE v2, VALUE v3, VALUE v0)
return newobj_of(v0, flags, v1, v2, v3, FALSE);
}
-VALUE
+static VALUE
rb_imemo_tmpbuf_auto_free_maybe_mark_buffer(void *buf, size_t cnt)
{
return rb_imemo_tmpbuf_new((VALUE)buf, 0, (VALUE)cnt, 0);
@@ -9624,7 +9626,7 @@ rb_aligned_malloc(size_t alignment, size_t size)
return res;
}
-void
+static void
rb_aligned_free(void *ptr)
{
#if defined __MINGW32__