Commit 7fa784a
authored
Disable mem usage test case for non-jemalloc allocators (#1685)
Attempt to fix non-jemalloc builds by disabling this test case on
non-jemalloc builds:
```
*** [err]: Memory usage of embedded string value in tests/unit/type/string.tcl
Expected '40' to be less than or equal to '32' (context: type eval line 5 cmd {assert_lessthan_equal [r memory usage quux] 32} proc ::test)
```
We can't assume anything about allocation size classes for arbitrary
allocators.
Glibc malloc seems to give usable sizes of 24, 40, 56, 72, 88, 104, ...,
not similar to jemalloc size classes.
Additional change: encode unused robj allocation space in the EMBSTR sds
header. This makes the test case able to correctly calculate the memory
overhead of the different structures in 32-bit builds, where there is
some unused space in the allocation (because the `robj` header is
smaller).
---------
Signed-off-by: Viktor Söderqvist <[email protected]>1 parent e9ed53c commit 7fa784a
2 files changed
+7
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
195 | 195 | | |
196 | 196 | | |
197 | 197 | | |
198 | | - | |
199 | | - | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
200 | 202 | | |
201 | 203 | | |
202 | 204 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
756 | 756 | | |
757 | 757 | | |
758 | 758 | | |
| 759 | + | |
759 | 760 | | |
760 | 761 | | |
761 | 762 | | |
| |||
779 | 780 | | |
780 | 781 | | |
781 | 782 | | |
| 783 | + | |
| 784 | + | |
782 | 785 | | |
0 commit comments