Skip to content
  • Peter Zhu's avatar
    057df437
    Free environ when RUBY_FREE_AT_EXIT · 057df437
    Peter Zhu authored
    The environ is malloc'd, so it gets reported as a memory leak. This
    commit adds ruby_free_proctitle which frees it during shutdown when
    RUBY_FREE_AT_EXIT is set.
    
        STACK OF 1 INSTANCE OF 'ROOT LEAK: <calloc in ruby_init_setproctitle>':
        5   dyld                                  0x18b7090e0 start + 2360
        4   ruby                                  0x10000e3a8 main + 100  main.c:58
        3   ruby                                  0x1000b4dfc ruby_options + 180  eval.c:121
        2   ruby                                  0x1001c5f70 ruby_process_options + 200  ruby.c:3014
        1   ruby                                  0x10035c9fc ruby_init_setproctitle + 76  setproctitle.c:105
        0   libsystem_malloc.dylib                0x18b8c7b78 _malloc_zone_calloc_instrumented_or_legacy + 100
    057df437
    Free environ when RUBY_FREE_AT_EXIT
    Peter Zhu authored
    The environ is malloc'd, so it gets reported as a memory leak. This
    commit adds ruby_free_proctitle which frees it during shutdown when
    RUBY_FREE_AT_EXIT is set.
    
        STACK OF 1 INSTANCE OF 'ROOT LEAK: <calloc in ruby_init_setproctitle>':
        5   dyld                                  0x18b7090e0 start + 2360
        4   ruby                                  0x10000e3a8 main + 100  main.c:58
        3   ruby                                  0x1000b4dfc ruby_options + 180  eval.c:121
        2   ruby                                  0x1001c5f70 ruby_process_options + 200  ruby.c:3014
        1   ruby                                  0x10035c9fc ruby_init_setproctitle + 76  setproctitle.c:105
        0   libsystem_malloc.dylib                0x18b8c7b78 _malloc_zone_calloc_instrumented_or_legacy + 100
Loading