cairo-ocaml: Cairo_lablgtk.create causes immense amounts of disk activity
Submitted by Chris King
Assigned to Carl Worth @cworth
Description
Created attachment 39748 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.
Attachment 39748, "OCaml version (shows disk activity)":
bug.ml
Version: 1.10.1