Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
50f51814
Unverified
Commit
50f51814
authored
Jul 31, 2020
by
Oran Agra
Committed by
GitHub
Jul 31, 2020
Browse files
Remove dead code from update_zmalloc_stat_alloc (#7589)
this seems like leftover from before
6eb51bf1
parent
4ac1f9ac
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/zmalloc.c
View file @
50f51814
...
...
@@ -71,17 +71,8 @@ void zlibc_free(void *ptr) {
#define dallocx(ptr,flags) je_dallocx(ptr,flags)
#endif
#define update_zmalloc_stat_alloc(__n) do { \
size_t _n = (__n); \
if (_n&(sizeof(long)-1)) _n += sizeof(long)-(_n&(sizeof(long)-1)); \
atomicIncr(used_memory,__n); \
} while(0)
#define update_zmalloc_stat_free(__n) do { \
size_t _n = (__n); \
if (_n&(sizeof(long)-1)) _n += sizeof(long)-(_n&(sizeof(long)-1)); \
atomicDecr(used_memory,__n); \
} while(0)
#define update_zmalloc_stat_alloc(__n) atomicIncr(used_memory,(__n))
#define update_zmalloc_stat_free(__n) atomicDecr(used_memory,(__n))
static
size_t
used_memory
=
0
;
pthread_mutex_t
used_memory_mutex
=
PTHREAD_MUTEX_INITIALIZER
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment