<!--
{
  "availability" : [
    "iOS: 18.0.0 - 18.0.0",
    "macCatalyst: 18.0.0 - 18.0.0",
    "macOS: 10.15.0 - 11.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "EndpointSecurity",
  "identifier" : "/documentation/EndpointSecurity/es_message_size(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "Endpoint Security"
    ],
    "preciseIdentifier" : "c:@F@es_message_size"
  },
  "title" : "es_message_size(_:)"
}
-->

# es_message_size(_:)

Calculates the size of a message structure.

```
func es_message_size(_ msg: UnsafePointer<es_message_t>) -> Int
```

## Parameters

`msg`

The message to calculate the size of.

## Return Value

The calculated size of the message.

## Discussion

---

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)