<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    meant to say "no special memory management issues"<br>
    and (in case you actually would look at the code) mmap use is here:
<a class="moz-txt-link-freetext" href="https://github.com/burlen/SC11-100GB-Demo/blob/master/SC11DemoReader.h">https://github.com/burlen/SC11-100GB-Demo/blob/master/SC11DemoReader.h</a><strong>
    </strong><br>
    <strong><br>
    </strong><span class="repo-root js-repo-root"><span itemscope=""
        itemtype="http://data-vocabulary.org/Breadcrumb"><a
          href="https://github.com/burlen/SC11-100GB-Demo"
          data-branch="master" data-direction="back" data-pjax="true"
          itemscope="url"><span itemprop="title"></span></a></span></span><span
      class="separator"></span><strong class="final-path"></strong>
    <div class="moz-cite-prefix">On 05/16/2014 10:50 AM, Burlen Loring
      wrote:<br>
    </div>
    <blockquote cite="mid:53764FFB.6040502@gmail.com" type="cite">Hi
      David,
      <br>
      <br>
      I've used mmap with VTK in C++ for the SC11 100GB network demo.
      <br>
      <br>
      <a class="moz-txt-link-freetext" href="http://dl.acm.org/citation.cfm?id=2287004">http://dl.acm.org/citation.cfm?id=2287004</a>
      <br>
      <a class="moz-txt-link-freetext" href="https://github.com/burlen/SC11-100GB-Demo">https://github.com/burlen/SC11-100GB-Demo</a>
      <br>
      <br>
      This use was very ad-hoc and we wanted the data mapped for the
      life of the app so there were special memory management issues.
      <br>
      <br>
      patch(<a class="moz-txt-link-freetext" href="http://review.source.kitware.com/#/c/14072/">http://review.source.kitware.com/#/c/14072/</a>) would have
      handled situations such as this through a callback invoked when
      the data array is finished with the pointer. However, that patch
      was rejected for being overkill. Instead Berk suggested that I
      simply use the delete event observer, which will always result in
      data being released but perhaps not as quickly as with the
      callback or the method that you proposed(eg nothing happens if the
      array is resized). This approach has worked well for me. I wonder
      if using the delete event observer would work well in your case?
      <br>
      <br>
      Burlen
      <br>
      <br>
      <br>
      On 05/16/2014 10:21 AM, David Gobbi wrote:
      <br>
      <blockquote type="cite">Hi All,
        <br>
        <br>
        I've used memory mapped files with VTK in the past, using the
        python
        <br>
        "mmap" object to create the map and then passing the resulting
        pointer
        <br>
        to VTK via the SetVoidArray() method.  For large files (several
        GB) I've
        <br>
        found this to be many times faster than e.g. vtkImageReader2.
        <br>
        <br>
        My question: has anyone used mmap with VTK in C++? 
        Specifically,
        <br>
        what I'm interested in doing is adding a new "delete method" to
        the
        <br>
        SetVoidPointer() method in vtkDataArrayTemplate.h: it already
        has
        <br>
        "delete methods" for "malloc" and "new", so the idea is to add
        another
        <br>
        delete method for "mmap" that will call munmap on the pointer.
        <br>
        <br>
           David
        <br>
        _______________________________________________
        <br>
        Powered by <a class="moz-txt-link-abbreviated" href="http://www.kitware.com">www.kitware.com</a>
        <br>
        <br>
        Visit other Kitware open-source projects at
        <a class="moz-txt-link-freetext" href="http://www.kitware.com/opensource/opensource.html">http://www.kitware.com/opensource/opensource.html</a>
        <br>
        <br>
        Follow this link to subscribe/unsubscribe:
        <br>
        <a class="moz-txt-link-freetext" href="http://www.vtk.org/mailman/listinfo/vtk-developers">http://www.vtk.org/mailman/listinfo/vtk-developers</a>
        <br>
        <br>
      </blockquote>
      <br>
    </blockquote>
    <br>
  </body>
</html>