mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-12-02 07:06:41 +03:00
move arm in trim_node when not in bitmap
This commit is contained in:
parent
745cff44ad
commit
f0c410855f
@ -220,7 +220,7 @@ _ch_trim_node(u3h_root* har_u, u3h_slot* sot_w, c3_w lef_w, c3_w rem_w)
|
|||||||
map_w = han_u->map_w;
|
map_w = han_u->map_w;
|
||||||
|
|
||||||
if ( 0 == (map_w & (1 << bit_w)) ) {
|
if ( 0 == (map_w & (1 << bit_w)) ) {
|
||||||
fprintf(stderr, "empty slot, lef_w: %d rem_w: %d\r\n", lef_w, rem_w);
|
har_u->arm_u.mug_w = _ch_skip_slot(har_u->arm_u.mug_w, lef_w);
|
||||||
return c3n;
|
return c3n;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -14,7 +14,7 @@ main(int argc, char* argv[])
|
|||||||
|
|
||||||
//_test_no_cache();
|
//_test_no_cache();
|
||||||
_test_skip_slot();
|
_test_skip_slot();
|
||||||
//_test_cache_trimming();
|
_test_cache_trimming();
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -78,6 +78,8 @@ _test_skip_slot(void)
|
|||||||
c3_w res_w = _ch_skip_slot(mug_w, 20);
|
c3_w res_w = _ch_skip_slot(mug_w, 20);
|
||||||
c3_assert((1 << 25) == res_w);
|
c3_assert((1 << 25) == res_w);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fprintf(stderr, "test_skip_slot: ok\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
/* _test_cache_trimming(): ensure a caching hashtable removes stale items.
|
/* _test_cache_trimming(): ensure a caching hashtable removes stale items.
|
||||||
|
Loading…
Reference in New Issue
Block a user