From 69a63bbee8959a89a92c8b79beaa3907decdfbd5 Mon Sep 17 00:00:00 2001 From: fincs <fincs@devkitpro.org> Date: Sat, 19 Oct 2019 04:00:21 +0200 Subject: [PATCH] fsdev: Reduce TLS footprint for rarely used codepaths --- nx/source/runtime/devices/fs_dev.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nx/source/runtime/devices/fs_dev.c b/nx/source/runtime/devices/fs_dev.c index 51b2c64e..2036b886 100644 --- a/nx/source/runtime/devices/fs_dev.c +++ b/nx/source/runtime/devices/fs_dev.c @@ -763,7 +763,7 @@ fsdev_write_safe(struct _reent *r, /* Copy to internal buffer and transfer in chunks. * You cannot use FS read/write with certain memory. */ - static __thread char tmp_buffer[8192]; + char tmp_buffer[0x1000]; while(len > 0) { size_t toWrite = len; @@ -868,7 +868,7 @@ fsdev_read_safe(struct _reent *r, /* Transfer in chunks with internal buffer. * You cannot use FS read/write with certain memory. */ - static __thread char tmp_buffer[8192]; + char tmp_buffer[0x1000]; while(len > 0) { u64 toRead = len;