equal
deleted
inserted
replaced
68 if (sz > 0) { |
68 if (sz > 0) { |
69 Atomic::sub(sz, &_size); |
69 Atomic::sub(sz, &_size); |
70 } |
70 } |
71 } |
71 } |
72 |
72 |
73 inline void resize(ssize_t sz) { |
73 inline void resize(long sz) { |
74 if (sz != 0) { |
74 if (sz != 0) { |
75 assert(sz >= 0 || _size >= size_t(-sz), "Must be"); |
|
76 Atomic::add(size_t(sz), &_size); |
75 Atomic::add(size_t(sz), &_size); |
77 DEBUG_ONLY(_peak_size = MAX2(_size, _peak_size);) |
76 DEBUG_ONLY(_peak_size = MAX2(_size, _peak_size);) |
78 } |
77 } |
79 } |
78 } |
80 |
79 |
112 |
111 |
113 inline void record_arena_free() { |
112 inline void record_arena_free() { |
114 _arena.deallocate(0); |
113 _arena.deallocate(0); |
115 } |
114 } |
116 |
115 |
117 inline void record_arena_size_change(ssize_t sz) { |
116 inline void record_arena_size_change(long sz) { |
118 _arena.resize(sz); |
117 _arena.resize(sz); |
119 } |
118 } |
120 |
119 |
121 inline size_t malloc_size() const { return _malloc.size(); } |
120 inline size_t malloc_size() const { return _malloc.size(); } |
122 inline size_t malloc_count() const { return _malloc.count();} |
121 inline size_t malloc_count() const { return _malloc.count();} |
360 |
359 |
361 static inline void record_arena_free(MEMFLAGS flags) { |
360 static inline void record_arena_free(MEMFLAGS flags) { |
362 MallocMemorySummary::record_arena_free(flags); |
361 MallocMemorySummary::record_arena_free(flags); |
363 } |
362 } |
364 |
363 |
365 static inline void record_arena_size_change(ssize_t size, MEMFLAGS flags) { |
364 static inline void record_arena_size_change(int size, MEMFLAGS flags) { |
366 MallocMemorySummary::record_arena_size_change(size, flags); |
365 MallocMemorySummary::record_arena_size_change(size, flags); |
367 } |
366 } |
368 private: |
367 private: |
369 static inline MallocHeader* malloc_header(void *memblock) { |
368 static inline MallocHeader* malloc_header(void *memblock) { |
370 assert(memblock != NULL, "NULL pointer"); |
369 assert(memblock != NULL, "NULL pointer"); |