[ruby-core:87461] Re: [Ruby trunk Feature#14767] [PATCH] gc.c: use monotonic counters for objspace_malloc_increase

From: Eric Wong <normalperson@...>
Date: 2018-06-08 20:06:12 UTC
List: ruby-core #87461
naruse@airemix.jp wrote:
> I once get a thought, instead of counting memory Ruby itself bundling jemalloc and use jemalloc's memory profiler.
> jemalloc counting allocated bytes inside it.
> If Ruby accesses it, Ruby can avoid to execute extra atomic instructions.

Right.  Ideally, we won't have to count malloc bytes at all.
What I would prefer is malloc could allow executing hooks
before it calls sbrk/mmap to get more memory from the kernel:
That would be the ideal time for us to GC.

Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>

In This Thread

Prev Next