blob: 893f539eb2b1b3e88e3358ed91db9320ab1f7684 [file] [log] [blame] [view]
# configure method
*[<Null safety>](https://dart.dev/null-safety)*
void configure
({int? vmoSizeBytes})
<p>Optionally configure global settings for inspection.</p>
<p>This may not be called after the first call to Inspect().</p>
<p><code>vmoSizeBytes</code>: Sets the maximum size of the virtual memory object (VMO)
used to store inspection data for this program.
Must be at least 64 bytes.</p>
<p>Throws <a href="../../package-fuchsia_inspect_inspect/InspectStateError-class.md">InspectStateError</a> if called after Inspect(), or <code>ArgumentError</code>
if called with an invalid vmoSizeBytes.</p>
## Implementation
```dart
static void configure({int? vmoSizeBytes}) {
if (_singleton != null) {
throw InspectStateError(
'configureInspect cannot be called after factory runs');
}
if (vmoSizeBytes != null) {
if (vmoSizeBytes < 64) {
throw ArgumentError('VMO size must be at least 64 bytes.');
}
vmoSize = vmoSizeBytes;
}
}
```