Suggested fix for JDK-4724038 (Add unmap method to MappedByteBuffer)
Remi Forax
forax at univ-mlv.fr
Tue Sep 8 19:15:42 UTC 2015
On 09/08/2015 03:29 PM, Andrew Haley wrote:
> On 09/08/2015 02:05 PM, Andrew Haley wrote:
>> I don't think you'd actually need to unmap anything until a safepoint.
>> I don't think that the speed of unmapping is critical as long as it
>> happens "soon".
>
> Although given the desire to do
>
> buffer.unmap();
> file.delete();
>
> that belief may be misplaced. We could just block for a safepoint;
> we already do that in other cases, and there's no guarantee about how
> long unmap() would take to execute.
>
> Andrew.
>
I think a simple way to solve that is to ask for a safepoint explicitly,
buffer.unmap();
waitUntilUnmapped();
file.delete();
Rémi
----- Mail original -----
> De: "Andrew Haley" <aph at redhat.com>
> À: core-libs-dev at openjdk.java.net
> Envoyé: Mardi 8 Septembre 2015 15:29:25
> Objet: Re: Suggested fix for JDK-4724038 (Add unmap method to MappedByteBuffer)
>
> On 09/08/2015 02:05 PM, Andrew Haley wrote:
> > I don't think you'd actually need to unmap anything until a safepoint.
> > I don't think that the speed of unmapping is critical as long as it
> > happens "soon".
>
> Although given the desire to do
>
> buffer.unmap();
> file.delete();
>
> that belief may be misplaced. We could just block for a safepoint;
> we already do that in other cases, and there's no guarantee about how
> long unmap() would take to execute.
>
> Andrew.
>
>
More information about the core-libs-dev
mailing list