Skip to content

Commit

Permalink
Exclude jemalloc only operation (#34)
Browse files Browse the repository at this point in the history
- thread.tcache.flush command is not supported by memkind
  • Loading branch information
michalbiesek committed Jul 13, 2020
1 parent 8356e33 commit 1845fee
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions tests/unit/memefficiency.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -365,11 +365,13 @@ start_server {tags {"defrag"}} {
r config set maxmemory 0
set expected_frag 1.3

r debug mallctl-str thread.tcache.flush VOID
# fill the first slab containin 32 regs of 640 bytes.
for {set j 0} {$j < 32} {incr j} {
r setrange "_$j" 600 x
if {[string match {*jemalloc*} [s mem_allocator]]} {
r debug mallctl-str thread.tcache.flush VOID
# fill the first slab containin 32 regs of 640 bytes.
for {set j 0} {$j < 32} {incr j} {
r setrange "_$j" 600 x
r debug mallctl-str thread.tcache.flush VOID
}
}

# add a mass of keys with 600 bytes values, fill the bin of 640 bytes which has 32 regs per slab.
Expand Down

0 comments on commit 1845fee

Please sign in to comment.