fromOptions static method

int fromOptions(
  1. String options
)

The slots for the VM options text. The last flag wins.

Implementation

static int fromOptions(String options) {
  int megabytes = defaultMegabytes;
  for (RegExpMatch match in _size.allMatches(options)) {
    megabytes = int.parse(match.group(1)!);
  }
  int slots = megabytes ~/ 2;
  return slots < 1 ? 1 : slots;
}