summaryrefslogtreecommitdiff
path: root/src/vm/precode.h
diff options
context:
space:
mode:
authorKoundinya Veluri <kouvel@microsoft.com>2017-03-01 20:52:15 -0800
committerGitHub <noreply@github.com>2017-03-01 20:52:15 -0800
commit4bafc1004b99013eaa58450e4f974dc7169b5af1 (patch)
treec0238dcc72437a366a7f96e1aa5af4d5bc87e365 /src/vm/precode.h
parent1bf3bbb44397875e94ae95b8527fd1928b5373fe (diff)
downloadcoreclr-4bafc1004b99013eaa58450e4f974dc7169b5af1.tar.gz
coreclr-4bafc1004b99013eaa58450e4f974dc7169b5af1.tar.bz2
coreclr-4bafc1004b99013eaa58450e4f974dc7169b5af1.zip
Preallocate jump stubs for dynamic methods (#9883)
Preallocate jump stubs for dynamic methods - This eliminates the possibility of running into an out-of-memory situation after compiling the method - The temporary entry points block containing FixupPrecodes is extended for dynamic methods to include sufficient space for jump stubs - When the target is too far for the FixupPrecode to encode a short relative jump, it instead does a short relative call or jump to the corresponding jump stub, which does an absolute jump to the target
Diffstat (limited to 'src/vm/precode.h')
-rw-r--r--src/vm/precode.h9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/vm/precode.h b/src/vm/precode.h
index 430da663d7..0afa762647 100644
--- a/src/vm/precode.h
+++ b/src/vm/precode.h
@@ -311,13 +311,8 @@ public:
static Precode * GetPrecodeForTemporaryEntryPoint(TADDR temporaryEntryPoints, int index);
- static SIZE_T SizeOfTemporaryEntryPoints(PrecodeType t, int count);
- static SIZE_T SizeOfTemporaryEntryPoints(TADDR temporaryEntryPoints, int count)
- {
- WRAPPER_NO_CONTRACT;
- SUPPORTS_DAC;
- return SizeOfTemporaryEntryPoints(PTR_Precode(temporaryEntryPoints)->GetType(), count);
- }
+ static SIZE_T SizeOfTemporaryEntryPoints(PrecodeType t, bool preallocateJumpStubs, int count);
+ static SIZE_T SizeOfTemporaryEntryPoints(TADDR temporaryEntryPoints, int count);
static TADDR AllocateTemporaryEntryPoints(MethodDescChunk* pChunk,
LoaderAllocator *pLoaderAllocator, AllocMemTracker *pamTracker);