mirror of https://github.com/PCSX2/pcsx2.git
recompilers: always allocate the first block
Avoid several annoying SIGSEGV at startup
This commit is contained in:
parent
a4a0b42f8f
commit
26774a2fe0
|
@ -248,6 +248,11 @@ public:
|
|||
return m_blocksize * __pagesize;
|
||||
}
|
||||
|
||||
virtual void Reset()
|
||||
{
|
||||
_parent::Reset();
|
||||
}
|
||||
|
||||
protected:
|
||||
|
||||
// This function is called from OnPageFaultEvent after the address has been translated
|
||||
|
|
|
@ -73,9 +73,23 @@ void* RecompiledCodeReserve::Reserve( size_t size, uptr base, uptr upper_bounds
|
|||
{
|
||||
if (!_parent::Reserve(size, base, upper_bounds)) return NULL;
|
||||
_registerProfiler();
|
||||
|
||||
// Pre-Allocate the first block (to reduce the number of segmentation fault
|
||||
// in debugger)
|
||||
DoCommitAndProtect(0);
|
||||
|
||||
return m_baseptr;
|
||||
}
|
||||
|
||||
void RecompiledCodeReserve::Reset()
|
||||
{
|
||||
_parent::Reset();
|
||||
|
||||
// Pre-Allocate the first block (to reduce the number of segmentation fault
|
||||
// in debugger)
|
||||
DoCommitAndProtect(0);
|
||||
}
|
||||
|
||||
|
||||
// Sets the abbreviated name used by the profiler. Name should be under 10 characters long.
|
||||
// After a name has been set, a profiler source will be automatically registered and cleared
|
||||
|
|
|
@ -42,6 +42,7 @@ public:
|
|||
|
||||
virtual void* Reserve( size_t size, uptr base=0, uptr upper_bounds=0 );
|
||||
virtual void OnCommittedBlock( void* block );
|
||||
virtual void Reset();
|
||||
|
||||
virtual RecompiledCodeReserve& SetProfilerName( const wxString& shortname );
|
||||
virtual RecompiledCodeReserve& SetProfilerName( const char* shortname )
|
||||
|
|
Loading…
Reference in New Issue