summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIvan Maidanski <ivmai@mail.ru>2021-07-24 16:26:44 +0300
committerIvan Maidanski <ivmai@mail.ru>2021-08-21 01:04:29 +0300
commit27296f49a0335599605c74a180ba27b4b392848a (patch)
tree7f514ab9702d5b26154bd0a1b152f55b3b6474cc
parentcb537b832c4f307ef0792d87b8123981347d04e9 (diff)
downloadbdwgc-27296f49a0335599605c74a180ba27b4b392848a.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.h7
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;