smol-gilbraltar/patches/5.2.1/0013-Set-Max_domains-to-1.patch
2025-01-02 12:16:39 +01:00

35 lines
1.1 KiB
Diff

From bde7866513c8deeddd9165d05502162229abd13a Mon Sep 17 00:00:00 2001
From: Samuel Hym <samuel@tarides.com>
Date: Fri, 12 Apr 2024 19:21:52 +0200
Subject: [PATCH 13/14] Set Max_domains to 1
Solo5 is single-core with no scheduler, so avoid the useless memory
waste
Note that since PR#13272 the maximum number of domains can set using a
parameter in OCAMLRUNPARAM so `getenv` might be a better place to set
this limit in the future
---
runtime/caml/domain.h | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/runtime/caml/domain.h b/runtime/caml/domain.h
index 4b9be80b41..986486478c 100644
--- a/runtime/caml/domain.h
+++ b/runtime/caml/domain.h
@@ -31,11 +31,7 @@ extern "C" {
/* The runtime currently has a hard limit on the number of domains.
This hard limit may go away in the future. */
-#ifdef ARCH_SIXTYFOUR
-#define Max_domains 128
-#else
-#define Max_domains 16
-#endif
+#define Max_domains 1
/* is the minor heap full or an external interrupt has been triggered */
Caml_inline int caml_check_gc_interrupt(caml_domain_state * dom_st)
--
2.45.2