Skip to content

Commit c42acbc

Browse files
Back out of previous change (unsure if it's right), fix this in a "safer" way
1 parent 8c79c6e commit c42acbc

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

waterbox/emulibc/emulibc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ void* alloc_sealed(size_t size)
6060
return alloc_helper(size, &__wbxsysinfo.sealed, &__sealed_current, "sealed");
6161
}
6262

63-
ECL_INVISIBLE static unsigned long __invisible_current;
63+
static unsigned long __invisible_current;
6464
void* alloc_invisible(size_t size)
6565
{
6666
return alloc_helper(size, &__wbxsysinfo.invis, &__invisible_current, "invisible");

waterbox/melon/BizConsoleCreator.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
#include "CRC32.h"
1010
#include "FreeBIOS.h"
1111
#include "SPI.h"
12+
#include "InvisiblePoolAllocator.h"
1213

1314
#include "fatfs/diskio.h"
1415
#include "fatfs/ff.h"
@@ -1389,6 +1390,11 @@ ECL_EXPORT melonDS::NDS* CreateConsole(ConsoleCreationArgs* args, char* error)
13891390
{
13901391
try
13911392
{
1393+
if (!invisible_pool_init())
1394+
{
1395+
throw std::runtime_error("Failed to allocate invisible pool");
1396+
}
1397+
13921398
// SD Cards are set to be 256MiB always
13931399
constexpr u32 SD_CARD_SIZE = 256 * 1024 * 1024;
13941400

0 commit comments

Comments
 (0)