diff options
author | Ivan Maidanski <ivmai@mail.ru> | 2021-07-24 16:26:44 +0300 |
---|---|---|
committer | Ivan Maidanski <ivmai@mail.ru> | 2021-07-24 16:26:44 +0300 |
commit | 53fd2fb64d3c1861674d51ad9d4f5f4d6cb08b3b (patch) | |
tree | 39043d3822e8071e2d7e33195354e71d55d9c97e | |
parent | 7ec4fd937e9153213a0ab4c9779c19416007fc6f (diff) | |
download | bdwgc-53fd2fb64d3c1861674d51ad9d4f5f4d6cb08b3b.tar.gz |
Eliminate 'GC_non_gc_bytes is deprecated' warning in new_gc_alloc.h
* include/new_gc_alloc.h (GC_out_of_line_malloc): Define and use
non_gc_bytes local variable; replace read and store of GC_non_gc_bytes
directly to GC_get_non_gc_bytes() and GC_set_non_gc_bytes() calls.
-rw-r--r-- | include/new_gc_alloc.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/include/new_gc_alloc.h b/include/new_gc_alloc.h index 3e8a38ef..7ff2a0b3 100644 --- a/include/new_gc_alloc.h +++ b/include/new_gc_alloc.h @@ -155,14 +155,15 @@ void * GC_aux_template<dummy>::GC_out_of_line_malloc(size_t nwords, int kind) if (0 == op) GC_ALLOCATOR_THROW_OR_ABORT(); + GC_word non_gc_bytes = GC_get_non_gc_bytes(); GC_bytes_recently_allocd += GC_uncollectable_bytes_recently_allocd; - GC_non_gc_bytes += - GC_uncollectable_bytes_recently_allocd; + non_gc_bytes += GC_uncollectable_bytes_recently_allocd; GC_uncollectable_bytes_recently_allocd = 0; GC_bytes_recently_freed += GC_uncollectable_bytes_recently_freed; - GC_non_gc_bytes -= GC_uncollectable_bytes_recently_freed; + non_gc_bytes -= GC_uncollectable_bytes_recently_freed; GC_uncollectable_bytes_recently_freed = 0; + GC_set_non_gc_bytes(non_gc_bytes); GC_incr_bytes_allocd(GC_bytes_recently_allocd); GC_bytes_recently_allocd = 0; |