From 0e8219f591f3f17cb7ee361e8a60dbef08145883 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8D=9C=E9=83=A8=E6=98=8C=E5=B9=B3?= Date: Mon, 18 Nov 2019 12:13:08 +0900 Subject: 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. --- gc.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'gc.c') 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__ -- cgit v1.2.3