Roll back to 8MB buffer sizes to avoid random freezes

This commit is contained in:
Huntereb 2019-12-24 00:12:42 -05:00
parent c30e7b7cf3
commit 54dea51b01
4 changed files with 7 additions and 7 deletions

View File

@ -31,7 +31,7 @@ SOFTWARE.
namespace tin::data
{
static const size_t BUFFER_SEGMENT_DATA_SIZE = 0x1000000; // Approximately 16MB
static const size_t BUFFER_SEGMENT_DATA_SIZE = 0x800000; // Approximately 8MB
extern int NUM_BUFFER_SEGMENTS;
struct BufferSegment
@ -41,7 +41,7 @@ namespace tin::data
u8 data[BUFFER_SEGMENT_DATA_SIZE] = {0};
};
// Receives data in a circular buffer split into 16MB segments
// Receives data in a circular buffer split into 8MB segments
class BufferedPlaceholderWriter
{
private:

View File

@ -61,7 +61,7 @@ namespace tin::install::nsp
USBFuncArgs* args = reinterpret_cast<USBFuncArgs*>(in);
tin::util::USBCmdHeader header = tin::util::USBCmdManager::SendFileRangeCmd(args->nspName, args->pfs0Offset, args->ncaSize);
u8* buf = (u8*)memalign(0x1000, 0x1000000);
u8* buf = (u8*)memalign(0x1000, 0x800000);
u64 sizeRemaining = header.dataSize;
size_t tmpSizeRead = 0;
@ -69,7 +69,7 @@ namespace tin::install::nsp
{
while (sizeRemaining && !stopThreadsUsbNsp)
{
tmpSizeRead = awoo_usbCommsRead(buf, std::min(sizeRemaining, (u64)0x1000000));
tmpSizeRead = awoo_usbCommsRead(buf, std::min(sizeRemaining, (u64)0x800000));
if (tmpSizeRead == 0) THROW_FORMAT(("inst.usb.error"_lang).c_str());
sizeRemaining -= tmpSizeRead;

View File

@ -60,7 +60,7 @@ namespace tin::install::xci
USBFuncArgs* args = reinterpret_cast<USBFuncArgs*>(in);
tin::util::USBCmdHeader header = tin::util::USBCmdManager::SendFileRangeCmd(args->xciName, args->hfs0Offset, args->ncaSize);
u8* buf = (u8*)memalign(0x1000, 0x1000000);
u8* buf = (u8*)memalign(0x1000, 0x800000);
u64 sizeRemaining = header.dataSize;
size_t tmpSizeRead = 0;
@ -68,7 +68,7 @@ namespace tin::install::xci
{
while (sizeRemaining && !stopThreadsUsbXci)
{
tmpSizeRead = awoo_usbCommsRead(buf, std::min(sizeRemaining, (u64)0x1000000));
tmpSizeRead = awoo_usbCommsRead(buf, std::min(sizeRemaining, (u64)0x800000));
if (tmpSizeRead == 0) THROW_FORMAT(("inst.usb.error"_lang).c_str());
sizeRemaining -= tmpSizeRead;

View File

@ -25,7 +25,7 @@ namespace inst::ui {
}
} else if (!appletFinished) {
inst::ui::appletFinished = true;
tin::data::NUM_BUFFER_SEGMENTS = 4;
tin::data::NUM_BUFFER_SEGMENTS = 8;
}
if (!updateFinished && (!inst::config::autoUpdate || inst::util::getIPAddress() == "1.0.0.127")) updateFinished = true;
if (!updateFinished && menuLoaded && inst::config::updateInfo.size()) {