Bug 31090 - cairo-ocaml: Cairo_lablgtk.create causes immense amounts of disk activity
Summary: cairo-ocaml: Cairo_lablgtk.create causes immense amounts of disk activity
Status: RESOLVED MOVED
Alias: None
Product: cairo
Classification: Unclassified
Component: general (show other bugs)
Version: 1.10.1
Hardware: x86 (IA32) Linux (All)
: medium normal
Assignee: Carl Worth
QA Contact: cairo-bugs mailing list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-10-24 17:35 UTC by Chris King
Modified: 2018-08-25 13:50 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
OCaml version (shows disk activity) (377 bytes, application/octet-stream)
2010-10-24 17:35 UTC, Chris King
Details
C program (doesn't exhibit bug) (684 bytes, application/octet-stream)
2010-10-24 17:39 UTC, Chris King
Details

Description Chris King 2010-10-24 17:35:07 UTC
Created attachment 39748 [details]
OCaml version (shows disk activity)

The attached OCaml program is a simple 100Hz game loop which creates Cairo/Lablgtk contexts.  Using top, it can be seen that this results in the amount of cached filesystem data jumping up 200-300MB (and, depending on system load, causing actual disk activity).  The program itself does not actually use much memory.

This does *not* occur in the equivalent attached C program, leading me to believe the bug is in the OCaml bindings.

Furthermore, it should be noted that the Cairo context which is returned from gdk_cairo_create (which in turn calls cairo_create) is *not* freed upon garbage collection as it should be according to the cairo_create documentation.  Perhaps this is related?  If not, I will open a new bug report.
Comment 1 Chris King 2010-10-24 17:39:33 UTC
Created attachment 39749 [details]
C program (doesn't exhibit bug)

Note that commenting out the line "cairo_destroy(cr)" in paint() results in identical behavior to the OCaml version, lending weight to my memory leak theory.
Comment 2 GitLab Migration User 2018-08-25 13:50:27 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/cairo/cairo/issues/223.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.