Skip to content

Commit 5416308

Browse files
committed
[mimalloc] Prefer emscripten_err in _mi_prim_out_stderr. NFC
This function maps directly to stderr under node which is more direct than console.error and better in workers.
1 parent 7cff758 commit 5416308

File tree

1 file changed

+3
-3
lines changed
  • system/lib/mimalloc/src/prim/emscripten

1 file changed

+3
-3
lines changed

system/lib/mimalloc/src/prim/emscripten/prim.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ terms of the MIT license. A copy of the license can be found in the file
4747
// init
4848
//---------------------------------------------
4949

50-
void _mi_prim_mem_init( mi_os_mem_config_t* config) {
50+
void _mi_prim_mem_init(mi_os_mem_config_t* config) {
5151
config->page_size = 64*MI_KiB; // WebAssembly has a fixed page size: 64KiB
5252
config->alloc_granularity = 16;
5353
config->has_overcommit = false;
@@ -168,8 +168,8 @@ void _mi_prim_process_info(mi_process_info_t* pinfo)
168168

169169
#include <emscripten/console.h>
170170

171-
void _mi_prim_out_stderr( const char* msg) {
172-
emscripten_console_error(msg);
171+
void _mi_prim_out_stderr(const char* msg) {
172+
emscripten_err(msg);
173173
}
174174

175175

0 commit comments

Comments
 (0)