Memory issues with Phidget Interface Kit

C, C++, and Visual C++
Tibz

Memory issues with Phidget Interface Kit

Postby Tibz » Fri Sep 23, 2011 4:22 am

Hello everybody,

I've been using the C Phidget API in one of my project, and while I was fixing the memory leaks using Valgrind, I noticed some "definitely lost" and "still reachable" blocks comming from the Phidget functions. I then ran Valgrind on the (slightly modified) ifkit.c in the examples folder, and noticed that I still had this lost and still reachable blocks.

Should I call some clean up function? Or am I doing something wrong?

I attached the ifkit.c modified example that I used as well as the valigrind log.

Thank you in advance,
Attachments
ifkit.c
(3.5 KiB) Downloaded 190 times
valgrind_log.log
(9.34 KiB) Downloaded 201 times

User avatar
Patrick
Lead Developer
Posts: 3165
Joined: Mon Jun 20, 2005 8:46 am
Location: Canada
Contact:

Re: Memory issues with Phidget Interface Kit

Postby Patrick » Fri Sep 23, 2011 11:26 am

These appear to be almost exclusively in libusb. I'll have to see if we're doing something wrong cleaning up our usb handles.

-Patrick

Tibz

Re: Memory issues with Phidget Interface Kit

Postby Tibz » Mon Sep 26, 2011 12:59 am

Thank you. Please let me know if you find a fix.

Regards,

Thibaut

Tibz

Re: Memory issues with Phidget Interface Kit

Postby Tibz » Fri Sep 30, 2011 2:48 am

Hi again,

I just wanted to inform you of a new experiment that I made. I just replaced the sleep(5) by a getchar() in the ifkit.c file that I attached in my first post, and monitored the process with the Ubuntu system monitor. I discovered that the memory consumption is increasing by 4 Kb every 10-15 seconds, starting from around 450Kb to reach 530Kb after five minutes.

Regards,

Thibaut


Return to “C/C++”

Who is online

Users browsing this forum: No registered users and 4 guests