<html>
    <head>
      <base href="https://bugs.freedesktop.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - PDF creation memory usage"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=102481">102481</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>PDF creation memory usage
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>cairo
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>Other
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>medium
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>pdf backend
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>ajohnson@redneon.com
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>tteveris@gerberscientific.com
          </td>
        </tr>

        <tr>
          <th>QA Contact</th>
          <td>cairo-bugs@cairographics.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=133883" name="attach_133883" title="partical code c++">attachment 133883</a> <a href="attachment.cgi?id=133883&action=edit" title="partical code c++">[details]</a></span>
partical code c++

Windows 8.1 32 bit application, Cairo 1.15.2 - I'm trying to create a PDF with
a a large number of big images. The overall PDF size in inches is 150" x 60"
and I have PNG images that are 4k x 6k x 32 bit. The images are from from files
as you can see in the attached code I build a surface with the image and add it
to the context.

For each image I can see the memory usage going up until I hit 1gb and then
things start to fail (out of memory). I using the following to check usage:

    PROCESS_MEMORY_COUNTERS_EX pmc;
    pmc.cb = sizeof(PROCESS_MEMORY_COUNTERS_EX);
    GetProcessMemoryInfo(GetCurrentProcess(), (PROCESS_MEMORY_COUNTERS *)&pmc,
sizeof(pmc));

pmc.WorkingSetSize

The attached code is c# but I have a wrapper to the c++ library.

So my question is does cairo hold on to each surface even though I destroyed it
when I'm done? Or does cairo hold the info until the end of the process when
the PDF is actually written to disk?

Just trying to figure out how to move forward on this memory issue.

Thanks</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are the QA Contact for the bug.</li>
      </ul>
    </body>
</html>