mirror of
https://github.com/rvtr/ctr_Repair.git
synced 2025-10-31 13:51:08 -04:00
ヒープを共有しているのでスレッドごとに限界サイズまで確保しないように
git-svn-id: file:///Volumes/Transfer/gigaleak_20231201/2020-05-23%20-%20ctr.7z%20+%20svn_v1.068.zip/ctr/svn/ctr_Repair@319 385bec56-5757-e545-9c3a-d8741f4650f1
This commit is contained in:
parent
e901220d05
commit
0e74bf736e
@ -228,7 +228,7 @@ nn::Result ReadSerialNumber(u8* serial)
|
||||
|
||||
size_t readSize;
|
||||
common::SdReaderWriter sdReader;
|
||||
size_t bufSize = common::HeapManager::GetHeap()->GetAllocatableSize();
|
||||
size_t bufSize = 1024;
|
||||
void* buf = common::HeapManager::GetHeap()->Allocate(bufSize);
|
||||
if(buf != NULL)
|
||||
{
|
||||
@ -263,7 +263,7 @@ nn::Result EqualsDeviceIdFileandDeviceId(common::HardwareStateManager& manager)
|
||||
bit32 sdDeviceId;
|
||||
common::SdReaderWriter sdReader;
|
||||
size_t totalSize;
|
||||
size_t bufSize = common::HeapManager::GetHeap()->GetAllocatableSize();
|
||||
size_t bufSize = 1024;
|
||||
void* buf = common::HeapManager::GetHeap()->Allocate(bufSize);
|
||||
if (buf != NULL)
|
||||
{
|
||||
@ -311,7 +311,7 @@ nn::Result EqualsRegionDataandRegion()
|
||||
nn::cfg::CTR::CfgRegionCode sdRegion;
|
||||
common::SdReaderWriter sdReader;
|
||||
size_t readSize;
|
||||
size_t bufSize = common::HeapManager::GetHeap()->GetAllocatableSize();
|
||||
size_t bufSize = 1024;
|
||||
void* buf = common::HeapManager::GetHeap()->Allocate(bufSize);
|
||||
if (buf != NULL)
|
||||
{
|
||||
@ -385,7 +385,7 @@ nn::Result ImportCountryLanguageData()
|
||||
|
||||
if (common::ExistsCountryLanguageFile())
|
||||
{
|
||||
size_t bufSize = common::HeapManager::GetHeap()->GetAllocatableSize();
|
||||
size_t bufSize = 1024;
|
||||
void* buf = common::HeapManager::GetHeap()->Allocate(bufSize);
|
||||
if (buf != NULL)
|
||||
{
|
||||
@ -479,7 +479,7 @@ nn::Result ImportMcuRtc(common::HardwareStateManager& manager)
|
||||
{
|
||||
if (common::CheckFileExists(common::MCU_RTC_PATHNAME))
|
||||
{
|
||||
size_t bufSize = common::HeapManager::GetHeap()->GetAllocatableSize();
|
||||
size_t bufSize = 1024;
|
||||
NN_LOG("AllocatableSize = %d\n", bufSize);
|
||||
|
||||
void* buf = common::HeapManager::GetHeap()->Allocate(bufSize);
|
||||
@ -624,7 +624,7 @@ nn::Result ImportIvs()
|
||||
nn::Result result = nn::ResultSuccess();
|
||||
nn::fs::FileOutputStream fos;
|
||||
|
||||
size_t bufSize = common::HeapManager::GetHeap()->GetAllocatableSize() / 2;
|
||||
size_t bufSize = 1024;
|
||||
void* enc = common::HeapManager::GetHeap()->Allocate(bufSize);
|
||||
if (enc != NULL)
|
||||
{
|
||||
@ -744,7 +744,7 @@ nn::Result ImportNorData()
|
||||
|
||||
nn::cfg::nor::CTR::Initialize();
|
||||
|
||||
size_t bufSize = common::HeapManager::GetHeap()->GetAllocatableSize();
|
||||
size_t bufSize = common::HeapManager::GetHeap()->GetAllocatableSize() / 2;
|
||||
NN_LOG("AllocatableSize = %d\n", bufSize);
|
||||
|
||||
void* buf = common::HeapManager::GetHeap()->Allocate(bufSize);
|
||||
@ -819,7 +819,7 @@ nn::Result ReadVersionData()
|
||||
nn::Result result = nn::ResultSuccess();
|
||||
std::memset(&s_SDVersionData, 0, sizeof(common::VerDef));
|
||||
|
||||
size_t bufSize = common::HeapManager::GetHeap()->GetAllocatableSize();
|
||||
size_t bufSize = common::HeapManager::GetHeap()->GetAllocatableSize() / 2;
|
||||
NN_LOG("AllocatableSize = %d\n", bufSize);
|
||||
|
||||
void* buf = common::HeapManager::GetHeap()->Allocate(bufSize);
|
||||
@ -1057,7 +1057,7 @@ bool ReadSetting(bool* nupOnly, bool* getIvs, bool* checkSd, bool* skipNup)
|
||||
common::ConfigFileLoader configfileLoader;
|
||||
|
||||
common::SdMountManager::Mount();
|
||||
size_t size = common::HeapManager::GetHeap()->GetAllocatableSize();
|
||||
size_t size = 10240;
|
||||
void* heapAddr = common::HeapManager::GetHeap()->Allocate(size);
|
||||
|
||||
if(heapAddr != NULL)
|
||||
@ -1631,7 +1631,7 @@ nn::Result ImportCalData(common::CfgCalData *data)
|
||||
|
||||
common::SdMountManager::Mount();
|
||||
|
||||
size_t bufSize = common::HeapManager::GetHeap()->GetAllocatableSize();
|
||||
size_t bufSize = common::HeapManager::GetHeap()->GetAllocatableSize() / 2;
|
||||
void* buf = common::HeapManager::GetHeap()->Allocate(bufSize);
|
||||
if (buf != NULL)
|
||||
{
|
||||
|
||||
Loading…
Reference in New Issue
Block a user