tillrohrmann commented on a change in pull request #11109: [FLINK-15758][MemManager] Release segment and its unsafe memory in GC Cleaner URL: https://github.com/apache/flink/pull/11109#discussion_r410234004
########## File path: flink-runtime/src/main/java/org/apache/flink/runtime/memory/MemoryManager.java ########## @@ -779,20 +735,12 @@ public int getNumberOfPages() { return numberOfPages; } - public Set<MemoryType> getTypes() { - return Collections.unmodifiableSet(types); - } - public static Builder newBuilder(Object owner) { return new Builder(owner); } - public static AllocationRequest ofAllTypes(Object owner, int numberOfPages) { - return newBuilder(owner).ofAllTypes().numberOfPages(numberOfPages).build(); - } - - public static AllocationRequest ofType(Object owner, int numberOfPages, MemoryType type) { - return newBuilder(owner).ofType(type).numberOfPages(numberOfPages).build(); + public static AllocationRequest forOf(Object owner, int numberOfPages) { Review comment: I'm a bit unsure about the name of this method. Maybe rename it into `for` and don't use static imports in the test but write instead `AllocationRequest.for(owner, numberOfPages)`. I think this would be a bit clearer. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services