File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change 1010#define IS_BIG_ENDIAN (__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__)
1111#endif
1212
13- #define DOUBLE_SIZE_ON_64_BIT (size ) ((size) * (sizeof(void *) / 4))
13+ // Using 8 here instead of sizeof(size_t) to ensure compatibility
14+ #define SIZEOF_POINTER (size_t)8
15+ #define DOUBLE_SIZE_ON_64_BIT (size ) ((size) * (SIZEOF_POINTER / 4))
1416
1517#endif // PLATFORM_INFO_H
Original file line number Diff line number Diff line change @@ -159,8 +159,8 @@ void main_func(void) {
159159 WHBLogPrint ("Exception handler initialized." );
160160#endif
161161
162- static u64 pool [0x165000 / 8 / 4 * sizeof ( void * )] ;
163- main_pool_init (pool , pool + sizeof (pool ) / sizeof ( pool [ 0 ]) );
162+ static u8 pool [DOUBLE_SIZE_ON_64_BIT ( 0x165000 )] __attribute__ (( aligned ( 16 ))) ;
163+ main_pool_init (pool , pool + sizeof (pool ));
164164 gEffectsMemoryPool = mem_pool_init (0x4000 , MEMORY_POOL_LEFT );
165165
166166 configfile_load (CONFIG_FILE );
You can’t perform that action at this time.
0 commit comments