Skip to content

[scudo] Use MemMap in BufferPool and RegionPageMap #66788

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

Merged
merged 2 commits into from
Sep 28, 2023

Conversation

fabio-d
Copy link
Contributor

@fabio-d fabio-d commented Sep 19, 2023

No description provided.

Copy link
Contributor

@ChiaHungDuan ChiaHungDuan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you separate this into 2 CLs? The first one fixes the use of static buffer as,
in RegionPageMap,

  static const uptr StaticBufferSize = 512U * sizeof(uptr);
  static BufferPool<StaticBufferCount, StaticBufferSize> Buffers;

and in the BufferPool,

static constexpr uptr NumBufferElements = (StaticBufferSize + sizeof(uptr)) / sizeof(uptr);
uptr RawBuffer[StaticBufferCount * NumBufferElements] GUARDED_BY(Mutex);

I would like to keep the BufferSize as the number of bytes.

@ChiaHungDuan
Copy link
Contributor

Per discussion, we will use the number of elements and assign the type of buffer

@fabio-d
Copy link
Contributor Author

fabio-d commented Sep 20, 2023

Thanks! I've split the CL in two parts and uploaded the first part, with the changes we discussed, as #66896

Let's put this CL on hold for now until we land the new one :)

@fabio-d fabio-d force-pushed the use_memmap_in_bufferpool_and_regionpagemap branch from ce1fdaf to 9bf541f Compare September 27, 2023 15:15
@fabio-d fabio-d merged commit 4b18996 into llvm:main Sep 28, 2023
@fabio-d fabio-d deleted the use_memmap_in_bufferpool_and_regionpagemap branch September 28, 2023 14:34
legrosbuffle pushed a commit to legrosbuffle/llvm-project that referenced this pull request Sep 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants