Right now, the max_size() method of the MemoryPool class (and subclasses) returns size_t. However, according to the specification, -1 is a valid value (it means: undefined). From the javadoc of MemoryUsage.getMax() method:
----------
getMax
public long getMax()
Returns the maximum amount of memory in bytes that can be used for memory management. This method returns -1 if the maximum memory size is undefined.
...
----------
And the getMax() method is eventually mapped to MemoryPool::max_size().
Changing the return type of max_size() from size_t to ssize_t would be more reasonable when returning -1 from max_size().