Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

handling variable size allocations #2

Open
zolutal opened this issue Jan 5, 2024 · 0 comments
Open

handling variable size allocations #2

zolutal opened this issue Jan 5, 2024 · 0 comments

Comments

@zolutal
Copy link
Owner

zolutal commented Jan 5, 2024

how could kcalloc, kmalloc_array, vmalloc, etc... be better supported?

it seems like a lot of these allocations are something like:

vmalloc(sizeof(struct _) [*+] n, flags)
kcalloc(n, sizeof(struct _), flags)
kmalloc_array(n, sizeof(struct _), flags)

which for cases where n is constant it might be feasible to do some constant evaluation, when n is not constant though I'm not sure how these could be handled

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

No branches or pull requests

1 participant