From: Eric Wong Date: 2018-05-17T02:03:50+00:00 Subject: [ruby-core:87094] Re: [Ruby trunk Feature#14767] [PATCH] gc.c: use monotonic counters for objspace_malloc_increase ko1@atdot.net wrote: > The only one problem is, if we have a bug (and it can be. because nobody test malloc/free counts), the values grow into strange values. I think we may get strange values with malloc_increase currently, too. Not a big deal, GC may start later or earlier. > Now we reset them at GC time. > What do you think about it? Not sure what you mean, we always ATOMIC_SIZE_EXCHANGE malloc_increase to zero in gc_reset_malloc_info. My patch also resets both counters (not 100% atomic because it's two atomic operations, but I think it's OK as a hint). Btw, I noticed I leftover a ssize_t usage in my patch to gc_reset_malloc_info, will fixup if I commit this. Unsubscribe: