[prev in list] [next in list] [prev in thread] [next in thread] 

List:       cairo
Subject:    [cairo] Fwd:  resource cleanup
From:       Kozhevnikov Mikhail <mikhailkozhevnikov () yandex ! ru>
Date:       2011-02-27 16:18:53
Message-ID: 111971298823533 () web159 ! yandex ! ru
[Download RAW message or body]

Hello Andrea,

Thank you, that is exactly what I was looking for!
After I've added a call to this method at the end of my program there's less "leaks", \
but some remain. Apparently the memory is allocated by certain pixman methods (stack \
trace attached). Maybe there's a method similar to cairo_debug_reset_static_data in \
pixman, too? I failed to find it so far. Or does it mean that something actually went \
wrong?

Cheers,
Mikhail

27.02.2011, 11:15, "Andrea Canciani" <ranma42@gmail.com>;:

> šOn Sun, Feb 27, 2011 at 2:56 AM, Kozhevnikov Mikhail
> š<mikhailkozhevnikov@yandex.ru>;; wrote:
> > ššHi,
> > 
> > ššI was wondering if it's possible to force cairo to release all allocated \
> > memory, including various caches and so on?
> šSee http://www.cairographics.org/manual/cairo-Error-handling.html#cairo-debug-reset-static-data
>  
> šAndrea


["stack2.log" (stack2.log)]

api.mk.exe!_heap_alloc_dbg_impl(unsigned int nSize=1028, int nBlockUse=1, const char \
* szFileName=0x00000000, int nLine=0, int * errno_tmp=0x0012cb98)  Line 387	C++ \
api.mk.exe!_nh_malloc_dbg_impl(unsigned int nSize=1028, int nhFlag=0, int \
nBlockUse=1, const char * szFileName=0x00000000, int nLine=0, int * \
errno_tmp=0x0012cb98)  Line 239 + 0x19 bytes	C++ api.mk.exe!_nh_malloc_dbg(unsigned \
int nSize=1028, int nhFlag=0, int nBlockUse=1, const char * szFileName=0x00000000, \
int nLine=0)  Line 296 + 0x1d bytes	C++ api.mk.exe!malloc(unsigned int nSize=1028)  \
Line 56 + 0x15 bytes	C++ \
api.mk.exe!_pixman_implementation_create(pixman_implementation_t * \
delegate=0x00cd80d0, const pixman_fast_path_t * fast_paths=0x00729c58)  Line 118 + \
0xa bytes	C api.mk.exe!pixman_fill(unsigned int * bits=0x00dc0040, int stride=915, \
int bpp=32, int x=0, int y=0, int width=915, int height=631, unsigned int \
xor=4294967295)  Line 862 + 0x2e bytes	C \
api.mk.exe!pixman_image_fill_boxes(pixman_op_t op=PIXMAN_OP_SRC, pixman_image * \
dest=0xffffffff, pixman_color * color=0x00000000, int n_boxes=0, const pixman_box32 * \
boxes=0x0012cc50)  Line 1024 + 0x2c bytes	C \
api.mk.exe!pixman_image_fill_rectangles(pixman_op_t op=PIXMAN_OP_OVER, pixman_image * \
dest=0x00cd5288, pixman_color * color=0x0012ccd4, int n_rects=0, const \
pixman_rectangle16 * rects=0x0012cce0)  Line 958 + 0x19 bytes	C \
api.mk.exe!_cairo_image_surface_fill_rectangles(void * abstract_surface=, \
_cairo_operator op=, const _cairo_color * color=, _cairo_rectangle_int32 * rects=, \
int num_rects=)  Line 1063 + 0x20 bytes	C


["stack1.log" (stack1.log)]

api.mk.exe!_heap_alloc_dbg_impl(unsigned int nSize=256, int nBlockUse=1, const char * \
szFileName=0x00000000, int nLine=0, int * errno_tmp=0x0012caac)  Line 387	C++ \
api.mk.exe!_nh_malloc_dbg_impl(unsigned int nSize=256, int nhFlag=0, int nBlockUse=1, \
const char * szFileName=0x00000000, int nLine=0, int * errno_tmp=0x0012caac)  Line \
239 + 0x19 bytes	C++ api.mk.exe!_calloc_dbg_impl(unsigned int nNum=1, unsigned int \
nSize=256, int nBlockUse=1, const char * szFileName=0x00000000, int nLine=0, int * \
errno_tmp=0x0012caac)  Line 593 + 0x20 bytes	C++ api.mk.exe!_calloc_dbg(unsigned int \
nNum=1, unsigned int nSize=256, int nBlockUse=1, const char * szFileName=0x00000000, \
int nLine=0)  Line 644 + 0x1d bytes	C++ api.mk.exe!calloc(unsigned int nNum=1, \
unsigned int nSize=256)  Line 56 + 0x13 bytes	C++ \
api.mk.exe!do_composite(pixman_implementation_t * imp=0x00cd8510, pixman_op_t \
op=PIXMAN_OP_OVER, pixman_image * src=0x00cd9e70, pixman_image * mask=0x00cda5e8, \
pixman_image * dest=0x00cd5288, int src_x=378, int src_y=464, int mask_x=0, int \
mask_y=0, int dest_x=378, int dest_y=464, int width=26, int height=32)  Line 657 + \
0x16 bytes	C api.mk.exe!pixman_image_composite32(pixman_op_t op=PIXMAN_OP_OVER, \
pixman_image * src=0x00000000, pixman_image * mask=0x00cda5e8, pixman_image * \
dest=0x00000000, int src_x=378, int src_y=464, int mask_x=0, int mask_y=0, int \
dest_x=378, int dest_y=464, int width=26, int height=32)  Line 824 + 0x35 bytes	C \
api.mk.exe!pixman_image_composite(pixman_op_t op=PIXMAN_OP_OVER, pixman_image * \
src=0x00000000, pixman_image * mask=0x00cda5e8, pixman_image * dest=0x00000000, short \
src_x=378, short src_y=464, short mask_x=0, short mask_y=0, short dest_x=378, short \
dest_y=0, unsigned short width=26, unsigned short height=32)  Line 775 + 0x3d bytes	C \
api.mk.exe!_cairo_image_surface_composite(_cairo_operator op=, _cairo_pattern * \
src_pattern=, _cairo_pattern * mask_pattern=, void * abstract_dst=, int src_x=, int \
src_y=, int mask_x=, int mask_y=, int dst_x=, int dst_y=, unsigned int width=, \
unsigned int height=)  Line 990 + 0x68 bytes	C \
api.mk.exe!_cairo_surface_composite(_cairo_operator op=CAIRO_OPERATOR_OVER, \
_cairo_pattern * src=0x00cd4480, _cairo_pattern * mask=0x0012cd40, _cairo_surface * \
dst=0x00cc9cc0, int src_x=378, int src_y=464, int mask_x=0, int mask_y=0, int \
dst_x=378, int dst_y=464, unsigned int width=26, unsigned int height=32)  Line 1300 + \
0x2e bytes	C api.mk.exe!_cairo_win32_scaled_font_show_glyphs(void * abstract_font=, \
_cairo_operator op=, _cairo_pattern * pattern=, _cairo_surface * generic_surface=, \
int source_x=, int source_y=, int dest_x=, int dest_y=, unsigned int width=, unsigned \
int height=, cairo_glyph_t * glyphs=, int num_glyphs=, int * remaining_glyphs=)  Line \
1476 + 0x30 bytes	C api.mk.exe!_cairo_scaled_font_show_glyphs(_cairo_scaled_font * \
scaled_font=0x00cca738, _cairo_operator op=CAIRO_OPERATOR_OVER, _cairo_pattern * \
pattern=0x00cd4480, _cairo_surface * surface=0x00cc9cc0, int source_x=378, int \
source_y=464, int dest_x=378, int dest_y=464, unsigned int width=26, unsigned int \
height=32, cairo_glyph_t * glyphs=0x0012db80, int num_glyphs=1)  Line 1826	C \
api.mk.exe!_cairo_surface_old_show_glyphs_draw_func(void * closure=, _cairo_operator \
op=, _cairo_pattern * src=, _cairo_surface * dst=, int dst_x=, int dst_y=, const \
_cairo_rectangle_int32 * extents=)  Line 975	C \
api.mk.exe!_clip_and_composite(_cairo_clip * clip=0x00000000, _cairo_operator \
op=CAIRO_OPERATOR_CLEAR, _cairo_pattern * src=0x00000000, _cairo_status (void *, \
_cairo_operator, _cairo_pattern *, _cairo_surface *, int, int, const \
_cairo_rectangle_int32 *)* draw_func=0x004313b0, void * draw_closure=0x0012d174, \
_cairo_surface * dst=0x00cc9cc0, const _cairo_rectangle_int32 * extents=0x00000000)  \
Line 398 + 0x10 bytes	C api.mk.exe!_cairo_surface_fallback_show_glyphs(_cairo_surface \
* surface=0x00cc9cc0, _cairo_operator op=CAIRO_OPERATOR_OVER, _cairo_pattern * \
source=0x00cd4480, cairo_glyph_t * glyphs=0x0012db80, int num_glyphs=1, \
_cairo_scaled_font * scaled_font=0x00cca738)  Line 1025 + 0x27 bytes	C \
api.mk.exe!_cairo_surface_show_text_glyphs(_cairo_surface * surface=, _cairo_operator \
op=, _cairo_pattern * source=, const char * utf8=, int utf8_len=, cairo_glyph_t * \
glyphs=, int num_glyphs=0, const cairo_text_cluster_t * clusters=, int num_clusters=, \
_cairo_text_cluster_flags cluster_flags=, _cairo_scaled_font * scaled_font=)  Line \
2335 + 0x11 bytes	C api.mk.exe!_cairo_gstate_show_text_glyphs(_cairo_gstate * \
gstate=0x00cc9e28, const char * utf8=0x00ccb330, int utf8_len=1, const cairo_glyph_t \
* glyphs=0x00000000, int num_glyphs=1, const cairo_text_cluster_t * \
clusters=0x00000000, int num_clusters=0, _cairo_text_cluster_flags cluster_flags=0)  \
Line 1664 + 0x32 bytes	C api.mk.exe!cairo_show_text(_cairo * cr=0x00cc9e08, const \
char * utf8=0x00ccb330)  Line 3136 + 0x25 bytes	C



--
cairo mailing list
cairo@cairographics.org
http://lists.cairographics.org/mailman/listinfo/cairo

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic