@@ -68,24 +68,24 @@ def test_get_per_process_cache():
68
68
def test_get_shared_memory_cache ():
69
69
from cucim import CuImage
70
70
71
- cache = CuImage .cache ("shared_memory" , memory_capacity = 2048 )
71
+ cache = CuImage .cache ("shared_memory" , memory_capacity = 128 )
72
72
assert int (cache .type ) == 2
73
73
assert cache .memory_size == 0
74
74
# It allocates additional memory
75
- assert cache .memory_capacity > 2 ** 20 * 2048
76
- assert cache .free_memory > 2 ** 20 * 2048
75
+ assert cache .memory_capacity > 2 ** 20 * 128
76
+ assert cache .free_memory > 2 ** 20 * 128
77
77
assert cache .size == 0
78
78
assert cache .capacity > 0
79
79
assert cache .hit_count == 0
80
80
assert cache .miss_count == 0
81
81
82
82
config = cache .config
83
83
# Check essential properties
84
- # {'type': 'shared_memory', 'memory_capacity': 2048, 'capacity': 10922 ,
85
- # 'mutex_pool_capacity': 11117 , 'list_padding': 10000,
84
+ # {'type': 'shared_memory', 'memory_capacity': 2048, 'capacity': 682 ,
85
+ # 'mutex_pool_capacity': 100003 , 'list_padding': 10000,
86
86
# 'extra_shared_memory_size': 100, 'record_stat': False}
87
87
assert config ["type" ] == "shared_memory"
88
- assert config ["memory_capacity" ] == 2048
88
+ assert config ["memory_capacity" ] == 128
89
89
assert not config ["record_stat" ]
90
90
91
91
0 commit comments