[Integrated] [foreign-memaccess] RFR: Add MemorySegment::fill
chegar at openjdk.java.net
Fri May 15 10:36:58 UTC 2020
On Wed, 13 May 2020 13:35:03 GMT, Chris Hegarty <chegar at openjdk.org> wrote:
> 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.
This pull request has now been integrated.
Author: Chris Hegarty <chegar at openjdk.org>
Committer: Maurizio Cimadamore <mcimadamore at openjdk.org>
Stats: 127 lines in 3 files changed: 1 ins; 125 del; 1 mod
Reviewed-by: jlaskey, jvernee, psandoz, mcimadamore
More information about the panama-dev