[compiler-rt] [scudo] Use MemMap in BufferPool and RegionPageMap (PR #66788)

via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 19 10:12:18 PDT 2023


https://github.com/ChiaHungDuan commented:

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.

https://github.com/llvm/llvm-project/pull/66788


More information about the llvm-commits mailing list