Skip to content
This repository was archived by the owner on Mar 25, 2025. It is now read-only.

Conversation

@kilaterlee
Copy link
Contributor

There has a hidden danger in g_hash_table_resize function:

The g_hash_table_resize, it seems to resize the has table, and write the old value to the new hash table. It seems look for the empty items in the new_nodes, and if the new_nodes is not be cleared, it maybe naver found the empty items. So I added a line under the g_new0 function, and I think clearing new_nodes every time may improve the performance.

Added a memset to clear the new_nodes to fix this problem.

There has a hidden danger in g_hash_table_resize function:

The g_hash_table_resize, it seems to resize the has table, and write the
old value to the new hash table. It seems look for the empty items in
the new_nodes, and if the new_nodes is not be cleared, it maybe naver
found the empty items. So I added a line under the g_new0 function, and
I think clearing new_nodes every time may improve the performance.

Added a memset to clear the new_nodes to fix this problem.

Signed-off-by: Chao Li <lichao@loongson.cn>
@kilaterlee
Copy link
Contributor Author

@andreiw Hi, please help to review this change, THX! :)

@kilaterlee
Copy link
Contributor Author

@andreiw Hi, please help to review this change, THX! :)

Hi @andreiw , can you please help to reivew this change?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants