From 0e74bf736eba168105987de8b82e4bfdd1615dd3 Mon Sep 17 00:00:00 2001 From: N2614 Date: Mon, 6 Jun 2011 12:11:36 +0000 Subject: [PATCH] =?UTF-8?q?=E3=83=92=E3=83=BC=E3=83=97=E3=82=92=E5=85=B1?= =?UTF-8?q?=E6=9C=89=E3=81=97=E3=81=A6=E3=81=84=E3=82=8B=E3=81=AE=E3=81=A7?= =?UTF-8?q?=E3=82=B9=E3=83=AC=E3=83=83=E3=83=89=E3=81=94=E3=81=A8=E3=81=AB?= =?UTF-8?q?=E9=99=90=E7=95=8C=E3=82=B5=E3=82=A4=E3=82=BA=E3=81=BE=E3=81=A7?= =?UTF-8?q?=E7=A2=BA=E4=BF=9D=E3=81=97=E3=81=AA=E3=81=84=E3=82=88=E3=81=86?= =?UTF-8?q?=E3=81=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- .../sources/ConsoleRestore/Importer.cpp | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/trunk/ConsoleDataMigration/sources/ConsoleRestore/Importer.cpp b/trunk/ConsoleDataMigration/sources/ConsoleRestore/Importer.cpp index 140cadf..a7e66c0 100644 --- a/trunk/ConsoleDataMigration/sources/ConsoleRestore/Importer.cpp +++ b/trunk/ConsoleDataMigration/sources/ConsoleRestore/Importer.cpp @@ -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) {