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

Optimize rax size tracking #1109

Open
zuiderkwast opened this issue Oct 2, 2024 · 1 comment
Open

Optimize rax size tracking #1109

zuiderkwast opened this issue Oct 2, 2024 · 1 comment

Comments

@zuiderkwast
Copy link
Contributor

Follow-up to #688.

Idea 1: Use the void *zmalloc_usable(size_t size, size_t *usable) which both allocate memory and return the allocation size, so it can be used in a single call instead of zmalloc and later calling 'zmalloc_size'.

Idea 2: Use the diff of the per-thread used_memory_thread in zmalloc, to see the memory usage before and after each rax operation and calculate rax used memory delta from this. This only works for up to some max number of threads, if we don't change this in zmalloc.c, but there is no clear answer to what to do if some module creates a lot of threads.

@zuiderkwast
Copy link
Contributor Author

@ranshid @knggk FYI

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant