-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gc: improve mallocarrays locality #56801
Conversation
8afa0e6
to
725adba
Compare
This seems to fix #56759 for me. So we probably want to backport this |
IIRC we're still using this data structure in 1.10. If this is indeed a source of a memory leak, then we should consider backporting it to 1.10 as well. |
ed028da
to
b02629a
Compare
small_arraylist_t has much better memory locality and space utilization than a linked list with individually malloc'd elements. However, seemed that it needed alignment of small_arraylist_t to both hold all elements the user might create and avoid gcc bugs.
b02629a
to
6e2c0cb
Compare
Can confirm this fixes #56759. Nice work! |
Do we know why it fixes the memory leak? Were we simply not freeing the elements of the linked list? |
yes |
No idea |
Could this also be backported to 1.10? |
small_arraylist_t has much better memory locality and space utilization than a linked list with individually malloc'd elements