The various SegmentAllocator subclasses do not check for the constraints mentioned in the javadoc. This patch pulls the checks into a common routine in the Utils class, and then call that check routine from all the `allocate` implementations.
------------- Commit messages: - Add comments in allocation check - Initial push Changes: https://git.openjdk.org/jdk19/pull/50/files Webrev: https://webrevs.openjdk.org/?repo=jdk19&pr=50&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8288761 Stats: 59 lines in 5 files changed: 43 ins; 13 del; 3 mod Patch: https://git.openjdk.org/jdk19/pull/50.diff Fetch: git fetch https://git.openjdk.org/jdk19 pull/50/head:pull/50 PR: https://git.openjdk.org/jdk19/pull/50