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

override add OpenBSD's malloc_conceal API proposal. #439

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

devnexen
Copy link
Contributor

@devnexen devnexen commented Dec 5, 2021

first step: templatization of PALs, type not triggered yet.

first step: templatization of PALs, type not triggered yet.
@devnexen devnexen marked this pull request as draft December 5, 2021 09:00
@mjp41
Copy link
Member

mjp41 commented Dec 13, 2021

Apologies, I broke CI with the branch name change, can you rebase onto the latest main to get the checks to run.

Sorry, I haven't commented on this yet, I try to get to it soon.

@mjp41
Copy link
Member

mjp41 commented Dec 15, 2021

Thanks for looking into this.

So here are some high-level points

  • I like having a completely distinct allocator for the concealed version.
  • I am not happy with the threading of template parameters. There seem to have affected more than I would expect.
  • There are two different pagemaps covering the whole address range as their are two different instances of BackendAllocator. Each will have it's own pagemap. I think a more complex structure is required here to allow more sharing. The pagemap is a massive reservation, and having two seems bad.
  • I think that perhaps ThreadAlloc should be templated to carry the underlying Alloc it is providing.
  • I am not happy to pass around a specific configuration feature to a Pal. I think we should have a different Pal as the template parameter. So you instantiate the backend with PalLinux<DoDump> rather than having a backend parameterised by a feature.

Some questions:

  • Do you want free to work on something returned by malloc_conceal?
  • Do malloc_conceal and malloc need to be in the same compilation unit?

Sorry, I haven't got much time until the new year to help you with this.

@devnexen
Copy link
Contributor Author

Some questions:

  • Do you want free to work on something returned by malloc_conceal?

Yes, the openbsd libc version allows it too thankfully, freezero just do an extra step, that s it.

  • Do malloc_conceal and malloc need to be in the same compilation unit?

Does not have to.

Sorry, I haven't got much time until the new year to help you with this.

I m not in a hurry myself no worries :-)

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

Successfully merging this pull request may close these issues.

2 participants