Use netty maxDirectMemory instead of DirectMemoryUtils
authorZhangJian He <shoothzj@gmail.com>
Wed, 6 Apr 2022 08:13:13 +0000 (16:13 +0800)
committerGitHub <noreply@github.com>
Wed, 6 Apr 2022 08:13:13 +0000 (10:13 +0200)
commitd4eba629504930ca6179dee220e075b489c193a7
treedafc8dc12283008a5d06fa318dafbbf6806d89cb
parentdc2b0c5dfd9a4cdef44cdab3da46c7ea8027ab13
Use netty maxDirectMemory instead of DirectMemoryUtils

### Motivation

Our `DirectMemoryUtils` has huge limit, it can't work well with other jvm. The Netty `PlatformDependent.maxDirectMemory();` is more generic.

### Changes
Use `PlatformDependent.maxDirectMemory();` instead of `DirectMemoryUtils`

Reviewers: Enrico Olivelli <eolivelli@gmail.com>, Andrey Yegorov <None>, Matteo Merli <mmerli@apache.org>, Nicolò Boschi <boschi1997@gmail.com>

This closes #2989 from Shoothzj/direct-memory
bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/IndexInMemPageMgr.java
bookkeeper-server/src/main/java/org/apache/bookkeeper/util/DirectMemoryUtils.java [deleted file]