LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 02-16-2007, 10:05 AM   #1
mihirsevak
LQ Newbie
 
Registered: Feb 2006
Location: Florida, USA
Distribution: Gentoo
Posts: 8

Rep: Reputation: 0
linux system() function + memory consumption


Hello everybody,
I have a C program which runs forever (forever loop). This program is
supposed to activate different commands and scripts on the basis of system status. In order to activate different commands and scripts I am using standard linux function system(). I have also tried fork() and exec..() family. Once program starts It starts eating up memory and in few hours there is no memory left for any other application. When i try to see meminfo in /proc i see that on every instance of activating the script my free memory is reducing and Inactive Memory Page are increased.
These inactive pages are not being freed either any time in the system uptime.
Any kind of help ... suggestion is appreciated.

Thanks in advance.
-Mihir.
 
Old 02-16-2007, 02:40 PM   #2
osor
HCL Maintainer
 
Registered: Jan 2006
Distribution: (H)LFS, Gentoo
Posts: 2,450

Rep: Reputation: 78
Maybe post the source?
 
Old 02-17-2007, 08:40 AM   #3
mihirsevak
LQ Newbie
 
Registered: Feb 2006
Location: Florida, USA
Distribution: Gentoo
Posts: 8

Original Poster
Rep: Reputation: 0
uClinux

Thanks for your response but i found that the code was being run
on uClinux system. When i tested it on Gentoo it was working as it
is supposed to ... if you have any experience with memory management in uClinux using page_alloc2 i would love to have a discussion about it.
Also the code is too big to post here so i might end up writing a small similar example of code and post it. Thanks for your interest. Hope to hear from you soon.
-Mihir.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Measuring Memory Consumption of a program mhelal Linux - Software 3 01-30-2007 07:10 PM
Memory Consumption of 10.2 naparhi Slackware 4 08-27-2006 03:10 AM
process memory consumption ilnli Linux - General 4 09-08-2005 07:13 PM
Tips on reducing memory consumption Boyer Linux - Software 13 01-17-2005 03:20 PM
Slackware memory consumption muhkuhmasta Slackware 5 07-15-2004 05:51 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 11:08 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration