Re: RFR: 8340307: Add explanation around MemorySegment:reinterpret regarding arenas [v6]

2024-11-04 Thread Per Minborg
> This PR proposes to add a small text segment on the > `MemorySegment::reinterpret` overloads that takes an Arena stating the > responsibility of actually freeing reinterpreted segments lies with the > *original* arena. Per Minborg has updated the pull request incrementally with one additional

Re: RFR: 8340307: Add explanation around MemorySegment:reinterpret regarding arenas [v6]

2024-11-04 Thread Jorn Vernee
On Mon, 4 Nov 2024 14:08:08 GMT, Per Minborg wrote: >> This PR proposes to add a small text segment on the >> `MemorySegment::reinterpret` overloads that takes an Arena stating the >> responsibility of actually freeing reinterpreted segments lies with the >> *original* arena. > > Per Minborg h

Re: RFR: 8340307: Add explanation around MemorySegment:reinterpret regarding arenas [v5]

2024-11-04 Thread Jorn Vernee
On Fri, 1 Nov 2024 09:11:43 GMT, Per Minborg wrote: >> This PR proposes to add a small text segment on the >> `MemorySegment::reinterpret` overloads that takes an Arena stating the >> responsibility of actually freeing reinterpreted segments lies with the >> *original* arena. > > Per Minborg h

Re: RFR: 8340307: Add explanation around MemorySegment:reinterpret regarding arenas [v5]

2024-11-01 Thread Per Minborg
> This PR proposes to add a small text segment on the > `MemorySegment::reinterpret` overloads that takes an Arena stating the > responsibility of actually freeing reinterpreted segments lies with the > *original* arena. Per Minborg has updated the pull request incrementally with one additional

Re: RFR: 8340307: Add explanation around MemorySegment:reinterpret regarding arenas [v4]

2024-10-31 Thread Maurizio Cimadamore
On Thu, 31 Oct 2024 14:32:46 GMT, Per Minborg wrote: >> This PR proposes to add a small text segment on the >> `MemorySegment::reinterpret` overloads that takes an Arena stating the >> responsibility of actually freeing reinterpreted segments lies with the >> *original* arena. > > Per Minborg

Re: RFR: 8340307: Add explanation around MemorySegment:reinterpret regarding arenas [v4]

2024-10-31 Thread Maurizio Cimadamore
On Thu, 31 Oct 2024 14:32:46 GMT, Per Minborg wrote: >> This PR proposes to add a small text segment on the >> `MemorySegment::reinterpret` overloads that takes an Arena stating the >> responsibility of actually freeing reinterpreted segments lies with the >> *original* arena. > > Per Minborg

Re: RFR: 8340307: Add explanation around MemorySegment:reinterpret regarding arenas [v4]

2024-10-31 Thread Per Minborg
> This PR proposes to add a small text segment on the > `MemorySegment::reinterpret` overloads that takes an Arena stating the > responsibility of actually freeing reinterpreted segments lies with the > *original* arena. Per Minborg has updated the pull request incrementally with one additional

Re: RFR: 8340307: Add explanation around MemorySegment:reinterpret regarding arenas [v3]

2024-10-31 Thread Per Minborg
> This PR proposes to add a small text segment on the > `MemorySegment::reinterpret` overloads that takes an Arena stating the > responsibility of actually freeing reinterpreted segments lies with the > *original* arena. Per Minborg has updated the pull request incrementally with two additional

Re: RFR: 8340307: Add explanation around MemorySegment:reinterpret regarding arenas [v2]

2024-10-31 Thread Jorn Vernee
On Thu, 31 Oct 2024 14:03:51 GMT, Jorn Vernee wrote: >> Per Minborg has updated the pull request with a new target base due to a >> merge or a rebase. The incremental webrev excludes the unrelated changes >> brought in by the merge/rebase. The pull request contains three additional >> commits

Re: RFR: 8340307: Add explanation around MemorySegment:reinterpret regarding arenas [v2]

2024-10-31 Thread Jorn Vernee
On Thu, 31 Oct 2024 13:42:03 GMT, Per Minborg wrote: >> This PR proposes to add a small text segment on the >> `MemorySegment::reinterpret` overloads that takes an Arena stating the >> responsibility of actually freeing reinterpreted segments lies with the >> *original* arena. > > Per Minborg

Re: RFR: 8340307: Add explanation around MemorySegment:reinterpret regarding arenas [v2]

2024-10-31 Thread Per Minborg
> This PR proposes to add a small text segment on the > `MemorySegment::reinterpret` overloads that takes an Arena stating the > responsibility of actually freeing reinterpreted segments lies with the > *original* arena. Per Minborg has updated the pull request with a new target base due to a m

Re: RFR: 8340307: Add explanation around MemorySegment:reinterpret regarding arenas

2024-10-30 Thread Maurizio Cimadamore
On Wed, 30 Oct 2024 12:57:50 GMT, Maurizio Cimadamore wrote: > But then, somewhere else say: > > "The returned segment is backed by the same memory region as that of the > original segment. As such, the region of memory backing the returned segment > is truly deallocated only when the origina

Re: RFR: 8340307: Add explanation around MemorySegment:reinterpret regarding arenas

2024-10-30 Thread Maurizio Cimadamore
On Wed, 30 Oct 2024 12:42:16 GMT, Jorn Vernee wrote: > I think it's technically correct, but I think it's starting off on the wrong > foot. There's no transfer of ownership happening, `reinterpret` just returns > a view of the old memory region with a new scope borrowed from the given > arena.

Re: RFR: 8340307: Add explanation around MemorySegment:reinterpret regarding arenas

2024-10-30 Thread Jorn Vernee
On Wed, 30 Oct 2024 10:58:22 GMT, Maurizio Cimadamore wrote: >> src/java.base/share/classes/java/lang/foreign/MemorySegment.java line 766: >> >>> 764: * method returns a segment that behaves as if it had been >>> allocated using the >>> 765: * provided arena except, the returned segm

Re: RFR: 8340307: Add explanation around MemorySegment:reinterpret regarding arenas

2024-10-30 Thread Maurizio Cimadamore
On Tue, 29 Oct 2024 12:42:47 GMT, Jorn Vernee wrote: >> This PR proposes to add a small text segment on the >> `MemorySegment::reinterpret` overloads that takes an Arena stating the >> responsibility of actually freeing reinterpreted segments lies with the >> *original* arena. > > src/java.bas

Re: RFR: 8340307: Add explanation around MemorySegment:reinterpret regarding arenas

2024-10-29 Thread Jorn Vernee
On Tue, 29 Oct 2024 12:20:01 GMT, Per Minborg wrote: > This PR proposes to add a small text segment on the > `MemorySegment::reinterpret` overloads that takes an Arena stating the > responsibility of actually freeing reinterpreted segments lies with the > *original* arena. src/java.base/share