[compiler-rt] Allow ZX_ERR_NO_RESOURCES with MAP_ALLOWNOMEM on Fuchsia (PR #89767)

Caslyn Tonelli via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 24 11:03:19 PDT 2024


================
@@ -227,7 +234,7 @@ bool ReservedMemoryFuchsia::createImpl(UNUSED uptr Addr, uptr Size,
   zx_status_t Status = _zx_vmar_map(_zx_vmar_root_self(), ZX_VM_ALLOW_FAULTS, 0,
                                     getPlaceholderVmo(), 0, Size, &Base);
   if (UNLIKELY(Status != ZX_OK)) {
-    if (Status != ZX_ERR_NO_MEMORY || !AllowNoMem)
+    if (!IsNoMemError(Status) || !AllowNoMem)
----------------
Caslyn wrote:

Yes - that's a great improvement!

https://github.com/llvm/llvm-project/pull/89767


More information about the llvm-commits mailing list