<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=ISO-8859-7">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Hi Peter,<br>
    <br>
    Continuing various tests with GraphHopper at Android I'm in a
    specific situation with memory issues.<br>
    <br>
    I try loading a big graph (e.g. Japan) at application start
    (following the GH android sample app guidelines).<br>
    First time all are ok, but if I perform some restarts of the app
    then eventually I see the following errors.<br>
    <br>
    My question: Is there a way to unload / free GH resources at
    application finish?<br>
    <br>
    <br>
    Couldn't map buffer 456 of 588 at position 478150756 for 616562588
    bytes with offset 100, new fileLength:616562788<br>
    java.lang.RuntimeException: Couldn't map buffer 456 of 588 at
    position 478150756 for 616562588 bytes with offset 100, new
    fileLength:616562788<br>
        at
    com.graphhopper.storage.MMapDataAccess.mapIt(MMapDataAccess.java:159)<br>
        at
com.graphhopper.storage.MMapDataAccess.loadExisting(MMapDataAccess.java:241)<br>
        at
com.graphhopper.storage.GraphHopperStorage.loadExisting(GraphHopperStorage.java:1355)<br>
        at com.graphhopper.GraphHopper.load(GraphHopper.java:669)<br>
        ...<br>
    Caused by: java.io.IOException: mmap failed: EPERM (Operation not
    permitted)<br>
        at java.nio.MemoryBlock.mmap(MemoryBlock.java:119)<br>
        at java.nio.FileChannelImpl.map(FileChannelImpl.java:253)<br>
        at
com.graphhopper.storage.MMapDataAccess.newByteBuffer(MMapDataAccess.java:177)<br>
        at
    com.graphhopper.storage.MMapDataAccess.mapIt(MMapDataAccess.java:151)<br>
        ... 14 more<br>
    Caused by: libcore.io.ErrnoException: mmap failed: EPERM (Operation
    not permitted)<br>
        at libcore.io.Posix.mmap(Native Method)<br>
        at libcore.io.ForwardingOs.mmap(ForwardingOs.java:94)<br>
        at java.nio.MemoryBlock.mmap(MemoryBlock.java:116)<br>
        ... 17 more<br>
    <br>
    <br>
    <div class="moz-signature">-- <br>
      <font color="#000000">Emux</font><br>
      <a href="http://wiki.openstreetmap.org/wiki/Cruiser">Cruiser</a> -
      <a
href="http://wiki.openstreetmap.org/wiki/Atlas_%28navigation_application%29">Atlas</a></div>
  </body>
</html>