Skip to content
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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

vtjnash
Copy link
Member

@vtjnash vtjnash commented Dec 11, 2024

small_arraylist_t has much better memory locality and space utilization than a linked list with individually malloc'd elements

@vtjnash vtjnash added the GC Garbage collector label Dec 11, 2024
@vtjnash vtjnash requested a review from gbaraldi December 11, 2024 14:19
src/gc-stock.c Outdated Show resolved Hide resolved
small_arraylist_t has much better memory locality and space utilization
than a linked list with individually malloc'd elements
@vtjnash vtjnash force-pushed the jn/mallocarrays-list branch from 8afa0e6 to 725adba Compare December 11, 2024 20:17
@gbaraldi
Copy link
Member

This seems to fix #56759 for me. So we probably want to backport this

@gbaraldi gbaraldi added the backport 1.11 Change should be backported to release-1.11 label Dec 11, 2024
@d-netto
Copy link
Member

d-netto commented Dec 11, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 1.11 Change should be backported to release-1.11 GC Garbage collector
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants