qjs: allow SI suffixes in memory sizes - set default stack size to 1 MB

This commit is contained in:
Fabrice Bellard
2025-04-07 11:47:57 +02:00
parent c805d4f784
commit ec83bd2098
2 changed files with 33 additions and 5 deletions

View File

@@ -322,7 +322,9 @@ static inline JSValue __JS_NewShortBigInt(JSContext *ctx, int64_t d)
#define JS_PROP_NO_ADD (1 << 16) /* internal use */
#define JS_PROP_NO_EXOTIC (1 << 17) /* internal use */
#define JS_DEFAULT_STACK_SIZE (256 * 1024)
#ifndef JS_DEFAULT_STACK_SIZE
#define JS_DEFAULT_STACK_SIZE (1024 * 1024)
#endif
/* JS_Eval() flags */
#define JS_EVAL_TYPE_GLOBAL (0 << 0) /* global code (default) */