mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-02-01 03:03:40 +00:00
JIT: Allow more blocks to be stored in the cache. Also, add margin to the IsFull check.
This commit is contained in:
parent
c30ec47937
commit
cf678a1aa6
@ -71,6 +71,7 @@ void Shutdown()
|
||||
#endif
|
||||
}
|
||||
|
||||
// NOTE: Due to the nature of getaddrinfo, this can block indefinitely. Not good.
|
||||
bool DNSResolve(const std::string &host, const std::string &service, addrinfo **res, std::string &error, DNSType type) {
|
||||
#if PPSSPP_PLATFORM(SWITCH)
|
||||
// Force IPv4 lookups.
|
||||
|
@ -91,8 +91,8 @@ bool JitBlock::ContainsAddress(u32 em_address) const {
|
||||
}
|
||||
|
||||
bool JitBlockCache::IsFull() const {
|
||||
// -10 to safely leave space for some proxy blocks, which we don't check before we allocate (not ideal, but should work).
|
||||
return num_blocks_ >= MAX_NUM_BLOCKS - 10;
|
||||
// Subtract some amount to safely leave space for some proxy blocks, which we don't check before we allocate (not ideal, but should be enough).
|
||||
return num_blocks_ >= MAX_NUM_BLOCKS - 512;
|
||||
}
|
||||
|
||||
void JitBlockCache::Init() {
|
||||
@ -218,7 +218,6 @@ void JitBlockCache::ProxyBlock(u32 rootAddress, u32 startAddress, u32 size, cons
|
||||
void JitBlockCache::AddBlockMap(int block_num) {
|
||||
const JitBlock &b = blocks_[block_num];
|
||||
// Convert the logical address to a physical address for the block map
|
||||
// Yeah, this'll work fine for PSP too I think.
|
||||
u32 pAddr = b.originalAddress & 0x1FFFFFFF;
|
||||
block_map_[std::make_pair(pAddr + 4 * b.originalSize, pAddr)] = block_num;
|
||||
}
|
||||
|
@ -227,7 +227,8 @@ private:
|
||||
std::pair<u32, u32> blockMemRanges_[3];
|
||||
|
||||
enum {
|
||||
MAX_NUM_BLOCKS = 65536*2
|
||||
// Where does this number come from?
|
||||
MAX_NUM_BLOCKS = 65536 * 4
|
||||
};
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user