summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorchenzizhan <[email protected]>2024-03-18 18:11:47 +0800
committerchenzizhan <[email protected]>2024-03-18 18:11:47 +0800
commit05a08ab6e66b169246c61bbcec0e9b70b65d7744 (patch)
treeeb158edc7eaedce0ad3ff89d2bb137a30363bdea
parent066f118246d476a6d229fd28bd8702dcc17d6a13 (diff)
Revert "performance: memset calls from maximum length to the actual effective length(fix)"
dsa This reverts commit 430968661fd17f16da68333365ce317e30a77dc8.
-rw-r--r--src/tags/cell_manager.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/tags/cell_manager.c b/src/tags/cell_manager.c
index 8ca7331..410ca58 100644
--- a/src/tags/cell_manager.c
+++ b/src/tags/cell_manager.c
@@ -81,11 +81,11 @@ void tag_id_map_free(struct tag_id_map *head)
void cell_manager_reset(struct cell_manager *pthis)
{
- memset(pthis->id_tag_array, 0, sizeof(struct tag_hash_key *) * (pthis->max_cell_id + 1));
pthis->next_cell_id = 0;
pthis->max_cell_id = -1;
pthis->current_cell_num = 0;
-
+ memset(pthis->id_tag_array, 0, sizeof(struct tag_hash_key *) * (pthis->max_cell_id + 1));
+
if (pthis->sampling_mode == SAMPLING_MODE_TOPK) {
heavy_keeper_reset(pthis->topk_tag_id_map);
return;