How to Avoid "Not enough Memory" error in c progra
- honey_hack
- Posts: 16
- Joined: Tue Aug 21, 2007 2:15 am
How to Avoid "Not enough Memory" error in c progra
Hi friends.. i am making a project in 'C' but as soon as include more then 2 .exe files in my progaram with the help of 'execl' command it gives the error............
please help
please help
- jack krauser
- Posts: 1005
- Joined: Wed Aug 29, 2007 5:45 pm
- Location: greece
- Contact:
yeah i agree this must be the promblemHacksign wrote:seems u memory is too small
try get a memory card ~~(i don't know wether i describe my opinion exactly)
hacker is a life style. its one that alters how you think, you perception of reality, your way of dealing with things in general, as well as things so common as how you talk, how you carry yourself, and even when and how long you sleep.
by Loyal_Dark
by Loyal_Dark
-
- Posts: 67
- Joined: Sat May 05, 2007 6:11 pm
- Location: San Carlos, CA
- Contact:
Re: How to Avoid "Not enough Memory" error in c pr
What operating system? When you say "with the help of execl" what exactly do you mean? You're having one program execl the other? You're getting this problem at runtime?honey_hack wrote:Hi friends.. i am making a project in 'C' but as soon as include more then 2 .exe files in my progaram with the help of 'execl' command it gives the error............
please help
I'll bet this isn't actually a lack of memory.
- jack krauser
- Posts: 1005
- Joined: Wed Aug 29, 2007 5:45 pm
- Location: greece
- Contact:
Re: How to Avoid "Not enough Memory" error in c pr
and if it's not the memory then what the hell is?Captain Segfault wrote:What operating system? When you say "with the help of execl" what exactly do you mean? You're having one program execl the other? You're getting this problem at runtime?honey_hack wrote:Hi friends.. i am making a project in 'C' but as soon as include more then 2 .exe files in my progaram with the help of 'execl' command it gives the error............
please help
I'll bet this isn't actually a lack of memory.
hacker is a life style. its one that alters how you think, you perception of reality, your way of dealing with things in general, as well as things so common as how you talk, how you carry yourself, and even when and how long you sleep.
by Loyal_Dark
by Loyal_Dark
-
- Posts: 67
- Joined: Sat May 05, 2007 6:11 pm
- Location: San Carlos, CA
- Contact:
Re: How to Avoid "Not enough Memory" error in c pr
Something else that manifests as a "not enough memory" error.jack krauser wrote: and if it's not the memory then what the hell is?
Just because it is running out of memory does not mean that lack of memory is the problem any more than a car running out of gas in 5 minutes would indicate that it needs a bigger gas tank.
- jack krauser
- Posts: 1005
- Joined: Wed Aug 29, 2007 5:45 pm
- Location: greece
- Contact:
Re: How to Avoid "Not enough Memory" error in c pr
mhhhmmmmmmmmm...... maybe it could be thatCaptain Segfault wrote:Something else that manifests as a "not enough memory" error.jack krauser wrote: and if it's not the memory then what the hell is?
Just because it is running out of memory does not mean that lack of memory is the problem any more than a car running out of gas in 5 minutes would indicate that it needs a bigger gas tank.
hacker is a life style. its one that alters how you think, you perception of reality, your way of dealing with things in general, as well as things so common as how you talk, how you carry yourself, and even when and how long you sleep.
by Loyal_Dark
by Loyal_Dark
- honey_hack
- Posts: 16
- Joined: Tue Aug 21, 2007 2:15 am
thank u to all of u for ur suggestions,,,,,,,,,,,,
actually i tried all go that,, but all in vain...
if i run all files saperately they run very good.. but i call all of them in my main progaram they generate error..... what i think is that.. there should be some system setting to solve that problem
the command which i am using is "execl("file name","argument 1","argument 2","argument 3");", it's an 'c' command to run the child process...............
actually i tried all go that,, but all in vain...
if i run all files saperately they run very good.. but i call all of them in my main progaram they generate error..... what i think is that.. there should be some system setting to solve that problem
the command which i am using is "execl("file name","argument 1","argument 2","argument 3");", it's an 'c' command to run the child process...............
-
- Posts: 67
- Joined: Sat May 05, 2007 6:11 pm
- Location: San Carlos, CA
- Contact:
You have the syntax slightly wrong; this may be your problem. It's actually execl("file name", "argument 0", "argument 1",...). So, if I wanted to execl the equivalent of "ls -l /" the command would be:the command which i am using is "execl("file name","argument 1","argument 2","argument 3");", it's an 'c' command to run the child process...............[/b]
execl("/bin/ls", "ls", "-l", "/");
Note that execl does not return when it succeeds! It means "replace the current process with that one". You couldn't use it to run multiple commands from a single main function unless you're forking.
Also, what OS are you running?
- honey_hack
- Posts: 16
- Joined: Tue Aug 21, 2007 2:15 am
thanks... i'll try that.. by the way i am using XP..Captain Segfault wrote:You have the syntax slightly wrong; this may be your problem. It's actually execl("file name", "argument 0", "argument 1",...). So, if I wanted to execl the equivalent of "ls -l /" the command would be:the command which i am using is "execl("file name","argument 1","argument 2","argument 3");", it's an 'c' command to run the child process...............[/b]
execl("/bin/ls", "ls", "-l", "/");
Note that execl does not return when it succeeds! It means "replace the current process with that one". You couldn't use it to run multiple commands from a single main function unless you're forking.
Also, what OS are you running?
- jack krauser
- Posts: 1005
- Joined: Wed Aug 29, 2007 5:45 pm
- Location: greece
- Contact:
me too but i'm thinking to take linux and ubuntuhoney_hack wrote:thanks... i'll try that.. by the way i am using XP..Captain Segfault wrote:You have the syntax slightly wrong; this may be your problem. It's actually execl("file name", "argument 0", "argument 1",...). So, if I wanted to execl the equivalent of "ls -l /" the command would be:the command which i am using is "execl("file name","argument 1","argument 2","argument 3");", it's an 'c' command to run the child process...............[/b]
execl("/bin/ls", "ls", "-l", "/");
Note that execl does not return when it succeeds! It means "replace the current process with that one". You couldn't use it to run multiple commands from a single main function unless you're forking.
Also, what OS are you running?
hacker is a life style. its one that alters how you think, you perception of reality, your way of dealing with things in general, as well as things so common as how you talk, how you carry yourself, and even when and how long you sleep.
by Loyal_Dark
by Loyal_Dark
- jack krauser
- Posts: 1005
- Joined: Wed Aug 29, 2007 5:45 pm
- Location: greece
- Contact:
i was but i just buy a new pc and i'm thinking what to use again<<D.A.>> wrote:By the way you said you are using slackware
hacker is a life style. its one that alters how you think, you perception of reality, your way of dealing with things in general, as well as things so common as how you talk, how you carry yourself, and even when and how long you sleep.
by Loyal_Dark
by Loyal_Dark