[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
Tue Apr 23 14:43:16 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:

It'd be nice to someday find a way to reduce the brainwork to parse this expression and make it more readable.

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


More information about the llvm-commits mailing list