Skip navigation.
Home
The QNX Community Portal

View topic - Memory Leak, Virtual Memory grows

Memory Leak, Virtual Memory grows

For the old QNX2 and QNX4 RTOS

Memory Leak, Virtual Memory grows

Postby natalia » Fri Aug 29, 2003 7:54 pm

Hi All!
I'm new with QNX and need some help.
We use QNX 4.25, run developed system, that has 11 tasks in it. None of them use dynamic memory allocation. But I noticed that over time memory (sin info) would go down and virtual memory grows. Any of qnx utils would not show code/data memory size changes for our tasks, everything looks stable.
What can be a reason of this memory leak?
Thanks for any information,
Natalia
natalia
New Member
 
Posts: 6
Joined: Fri Aug 29, 2003 7:42 pm

Postby Bomberman » Sat Aug 30, 2003 3:47 pm

???
:?
Bomberman
New Member
 
Posts: 7
Joined: Fri Jun 27, 2003 8:47 pm

Re: Memory Leak, Virtual Memory grows

Postby rgallen » Sun Aug 31, 2003 4:02 pm

natalia wrote:Hi All!
I'm new with QNX and need some help.
We use QNX 4.25, run developed system, that has 11 tasks in it. None of them use dynamic memory allocation. But I noticed that over time memory (sin info) would go down and virtual memory grows. Any of qnx utils would not show code/data memory size changes for our tasks, everything looks stable.
What can be a reason of this memory leak?
Thanks for any information,
Natalia


One possible reason would be a resource leak. Your application may not be leaking memory directly, but if it is leaking an O/S resource, it can cause an indirect memory leak.
rgallen
QNX Master
 
Posts: 671
Joined: Thu Jul 11, 2002 6:48 pm

Re: Memory Leak, Virtual Memory grows

Postby natalia » Sun Aug 31, 2003 10:20 pm

rgallen wrote:
natalia wrote:Hi All!
I'm new with QNX and need some help.
We use QNX 4.25, run developed system, that has 11 tasks in it. None of them use dynamic memory allocation. But I noticed that over time memory (sin info) would go down and virtual memory grows. Any of qnx utils would not show code/data memory size changes for our tasks, everything looks stable.
What can be a reason of this memory leak?
Thanks for any information,
Natalia


One possible reason would be a resource leak. Your application may not be leaking memory directly, but if it is leaking an O/S resource, it can cause an indirect memory leak.


Could you explain? What specific resources are you talking about? One of the applications uses udp sockets, pipes, shared memory and mapping...
I would appreciate if you give me more details I have to look at.
Thanks!
natalia
New Member
 
Posts: 6
Joined: Fri Aug 29, 2003 7:42 pm

Re: Memory Leak, Virtual Memory grows

Postby mmvzwsw » Mon Sep 01, 2003 7:19 am

natalia wrote:Hi All!
I'm new with QNX and need some help.
We use QNX 4.25, run developed system, that has 11 tasks in it. None of them use dynamic memory allocation. But I noticed that over time memory (sin info) would go down and virtual memory grows. Any of qnx utils would not show code/data memory size changes for our tasks, everything looks stable.
What can be a reason of this memory leak?
Thanks for any information,
Natalia


Are you using photon?
As far as I know, photon is using dynamic memory.
Werner Schweizer
mmvzwsw
New Member
 
Posts: 4
Joined: Thu Apr 10, 2003 7:52 am
Location: Switzerland

Postby natalia » Mon Sep 01, 2003 12:27 pm

No, I don't use photon. It is diskonchip.
natalia
New Member
 
Posts: 6
Joined: Fri Aug 29, 2003 7:42 pm

Re: Memory Leak, Virtual Memory grows

Postby rgallen » Mon Sep 01, 2003 2:41 pm

natalia wrote:
rgallen wrote:
natalia wrote:Hi All!
I'm new with QNX and need some help.
We use QNX 4.25, run developed system, that has 11 tasks in it. None of them use dynamic memory allocation. But I noticed that over time memory (sin info) would go down and virtual memory grows. Any of qnx utils would not show code/data memory size changes for our tasks, everything looks stable.
What can be a reason of this memory leak?
Thanks for any information,
Natalia


One possible reason would be a resource leak. Your application may not be leaking memory directly, but if it is leaking an O/S resource, it can cause an indirect memory leak.


Could you explain? What specific resources are you talking about? One of the applications uses udp sockets, pipes, shared memory and mapping...
I would appreciate if you give me more details I have to look at.
Thanks!


File descriptors to your sockets (are they being closed) ? File descriptors to pipes (are they being closed) ? Same for shared memory. I don't have many ideas beyond that, since they are the only resources you mention that you are using. It is also possible that there is nothing wrong with your code, and one of the resource managers itself has a leak (i.e. when you close the fd it doesn't clean up properly). It is hard to tell without more information.
rgallen
QNX Master
 
Posts: 671
Joined: Thu Jul 11, 2002 6:48 pm


Return to QNX2 and QNX4

Who is online

Users browsing this forum: Majestic-12 [Bot] and 1 guest