On Wed, 28 Sep 2022 13:41:06 GMT, Johan Sjölen <jsjo...@openjdk.org> wrote:
>> Or you could have the class that requires dynamic mtFlag be declared with >> mtNone and assert in one place in AllocateHeap that mt != mtNone. Actually >> that assert might already be there. Can't really puzzle out what Kim's >> change does. > > I added a mtInvalid flag and did the assert. mtNone seems to be dealt with in > some code, I'm not sure if it's appropriate to use it as an invalid value. > Regardless, mtInvalid is a better name (for this purpose), so maybe we can > change mtNone to mtInvalid in the future? A much simpler (in the sense of avoiding the use of advanced template features) alternative to the one I posted earlier. (Thanks to @stefank for the suggestion.) https://github.com/openjdk/jdk/compare/master...kimbarrett:openjdk-jdk:dynamic-memflags-specialize I dislike the current proposed approach of adding an optional MEMFLAGS argument to all the CHeapObj allocation functions. ------------- PR: https://git.openjdk.org/jdk/pull/10412