[Gambas-devel] Gambas Memory leak ... (?!)
Gareth Bult
gareth at ...560...
Wed Jan 21 00:51:21 CET 2009
>Do you have the memory leak with a v4l camera? Can the memory leak come from
>gv4l2_read_frame()?
I will check what happens when I use V4L with my current code presently, however
there is "no" memory allocation within "gv4l2_read_frame()".
Memory mapped buffers are created in;
"init_device"
Along with "THIS->frame" which is a static buffer used as a target for the
conversion routines.
Rough mapping;
.Image calls CWEBCAM_image
=> cwebcam_image
=> gv42l_read_frame( THIS )
=> gv42l calls xioctl a few times and calls gv4l2_process_image)
=> process_image calls one of the conversion routines from CConverters.c
(there are no malloc's or free's in this file)
=> result then goes to the IMAGE.Create call.
.. which leads me to IMAGE.Create, or .Image->Picture ...
Gareth.
----- Original Message -----
From: "Benoit Minisini" <gambas at ...1...>
To: "mailing list for gambas developers" <gambas-devel at lists.sourceforge.net>
Sent: Tuesday, 20 January, 2009 11:39:13 PM GMT +00:00 GMT Britain, Ireland, Portugal
Subject: Re: [Gambas-devel] Gambas Memory leak ... (?!)
On mercredi 21 janvier 2009, Gareth Bult wrote:
> Ok,
>
> Running the code again with a memory trace .. it's eating 7Mb/sec ..
> something is very wrong ...
>
> Gareth.
>
>
> ----- Original Message -----
> From: "Gareth Bult" <gareth at ...560...>
> To: "mailing list for gambas developers"
> <gambas-devel at lists.sourceforge.net> Sent: Tuesday, 20 January, 2009
> 11:30:10 PM GMT +00:00 GMT Britain, Ireland, Portugal Subject:
> [Gambas-devel] Gambas Memory leak ... (?!)
>
>
> Hi,
>
> My Webcam demo is looking good, it runs <x> V4L[1|2] cameras in tandem ..
> indeed I left two cameras running earlier and have just returned to find
> gbx3 has run out of memory at 1.8Gb. Having traced through the code,
> nothing I'm doing inside that loop is allocating memory .. directly .. :(
>
> Indeed I can only see two possible leaks;
>
> a. In Gambas on the line;
>
> pic.Picture = $device.Image.Picture
> (which is the line the code errored on ..)
>
> b. In CWebcam.c on the line;
>
> GB.ReturnObject(IMAGE.Create(THIS->w,THIS->h,GB_IMAGE_BGR,THIS->frame));
>
> Does anything spring to mind ???
>
> ... just double-double checked .. I can't see any other possibilities ..
> ???
>
> Gareth.
>
Do you have the memory leak with a v4l camera? Can the memory leak come from
gv4l2_read_frame()?
--
Benoit Minisini
------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
Gambas-devel mailing list
Gambas-devel at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-devel
--
Managing Director, Encryptec Limited
Tel: 0845 5082719, Mob: 0785 3305393
Email: gareth at ...560...
Statements made are at all times subject to Encryptec's Terms and Conditions of Business, which are available upon request.
More information about the Devel
mailing list