[foreign-memaccess] [Rev 01] RFR: Add MemorySegment::fill
Maurizio Cimadamore
mcimadamore at openjdk.java.net
Wed May 13 16:27:52 UTC 2020
On Wed, 13 May 2020 15:43:55 GMT, Paul Sandoz <psandoz at openjdk.org> wrote:
> I think we need to consider grouping bulk operations in the same place.
I suggested the location to Chris. Since the method operates on segment it felt right to add it on MemorySegment. If we
add it on MemoryAddress it will look a tad odd IMHO, since it works on segments.
We could tweak fill to work on MemoryAddress, but that means that the user has to pass an address and a length (which
is what a segment is).
Or we could make fill an instance method on segment.
I'm not sure there's one answer that's better than the others here - but I don't have any strong feelings one way or
another, so I'm open to suggestions.
-------------
PR: https://git.openjdk.java.net/panama-foreign/pull/161
More information about the panama-dev
mailing list