ios: more aggressive GC in NSE

This commit is contained in:
Evgeny Poberezkin
2024-01-09 19:34:54 +00:00
parent a2f190a6c6
commit 6067ac3c93
2 changed files with 5 additions and 2 deletions

View File

@@ -485,6 +485,7 @@ func doStartChat() -> DBMigrationResult? {
logger.debug("NotificationService: doStartChat")
haskell_init_nse()
let (_, dbStatus) = chatMigrateInit(confirmMigrations: defaultMigrationConfirmation(), backgroundMode: true)
logger.debug("NotificationService: doStartChat \(String(describing: dbStatus))")
if dbStatus != .ok {
resetChatCtrl()
NSEChatState.shared.set(.created)

View File

@@ -25,13 +25,15 @@ void haskell_init(void) {
}
void haskell_init_nse(void) {
int argc = 5;
int argc = 7;
char *argv[] = {
"simplex",
"+RTS", // requires `hs_init_with_rtsopts`
"-A1m", // chunk size for new allocations
"-H1m", // initial heap size
"-xn", // non-moving GC
"-F0.5", // heap growth triggering GC
"-Fd1", // memory return
"-c", // compacting garbage collector
0
};
char **pargv = argv;