<!--
{
  "availability" : [
    "macCatalyst: -",
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "EndpointSecurity",
  "identifier" : "/documentation/EndpointSecurity/es_event_mmap_t/max_protection",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "Endpoint Security"
    ],
    "preciseIdentifier" : "c:@SA@es_event_mmap_t@FI@max_protection"
  },
  "title" : "max_protection"
}
-->

# max_protection

The maximum value you can use for protection flags.

```
var max_protection: Int32
```

## Discussion

This value uses the protection flags defined by `mmap(2)`, such as `PROT_READ` and `PROT_WRITE`. You can use the definitions for these flags found in `sys/mman.h` in the macOS SDK inside of the Xcode app bundle.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)