[foreign-memaccess] [Rev 01] RFR: Add MemorySegment::fill
chegar at openjdk.java.net
Wed May 13 15:43:59 UTC 2020
> As part of feedback on the Foreign Memory API (when experimenting with
> its usage internally in the JDK), a small number of potential usability
> enhancements could be made to the API. This is the second such.
> This change proposes to add a new method:
> Which fills a value into the given memory segment. Fill can be useful to
> initialize or reset the memory of a segment, similar(ish) to memset.
> There are obviously different ways to provide such functionality, e.g.
> accepting a fill value with a bit width greater than 8 bits, but on
> balance this single method will likely satisfy the majority of simple
> use-cases. Other more advanced initialization scenarios would likely be
> served better from an interaction with the Vector API, or some such.
Chris Hegarty has updated the pull request incrementally with one additional commit since the last revision:
review comment: testFillWithNull -> testFillNull
- all: https://git.openjdk.java.net/panama-foreign/pull/161/files
- new: https://git.openjdk.java.net/panama-foreign/pull/161/files/e66ab857..af894de2
- full: https://webrevs.openjdk.java.net/panama-foreign/161/webrev.01
- incr: https://webrevs.openjdk.java.net/panama-foreign/161/webrev.00-01
Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod
Fetch: git fetch https://git.openjdk.java.net/panama-foreign pull/161/head:pull/161
More information about the panama-dev