Skip to content

Commit 5107b8f

Browse files
tommcdonCopilot
andauthored
Update DBG_MAX_EXECUTABLE_ALLOC_SIZE and EXPECTED_CHUNKSIZE (#117843)
* Update DBG_MAX_EXECUTABLE_ALLOC_SIZE and EXPECTED_CHUNKSIZE to account recent SharedPatchBypassBuffer changes * Comment-only update Co-authored-by: Copilot <[email protected]> * Improve EXPECTED_CHUNKSIZE comment --------- Co-authored-by: Copilot <[email protected]>
1 parent d757c03 commit 5107b8f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/coreclr/debug/ee/debugger.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1116,8 +1116,8 @@ class DebuggerMethodInfo
11161116
// different part of the address space (not on the heap).
11171117
// ------------------------------------------------------------------------ */
11181118

1119-
constexpr uint64_t DBG_MAX_EXECUTABLE_ALLOC_SIZE=112;
1120-
constexpr uint64_t EXPECTED_CHUNKSIZE=128;
1119+
constexpr uint64_t DBG_MAX_EXECUTABLE_ALLOC_SIZE=120; // sizeof (SharedPatchBypassBuffer)
1120+
constexpr uint64_t EXPECTED_CHUNKSIZE=256; // This must be a power of 2. It represents the size of DebuggerHeapExecutableMemoryChunk, can be the sizeof (DataChunk) or sizeof (BookkeepingChunk). Changes to DBG_MAX_EXECUTABLE_ALLOC_SIZE can affect this number. Currently we require 136 bytes, and so the closest power of 2 is 256.
11211121
constexpr uint64_t DEBUGGERHEAP_PAGESIZE=4096;
11221122
constexpr uint64_t CHUNKS_PER_DEBUGGERHEAP=(DEBUGGERHEAP_PAGESIZE / EXPECTED_CHUNKSIZE);
11231123
constexpr uint64_t MAX_CHUNK_MASK=((1ull << CHUNKS_PER_DEBUGGERHEAP) - 1);

0 commit comments

Comments
 (0)