Question on Deamons - Unix

This is a discussion on Question on Deamons - Unix ; When I write a daemon it is consuming more memory. But the system daemons are not like that. How can I write a daemon that should consume less memory?...

+ Reply to Thread
Results 1 to 2 of 2

Thread: Question on Deamons

  1. Question on Deamons

    When I write a daemon it is consuming more memory. But the system
    daemons are not like that. How can I write a daemon that should
    consume less memory?

  2. Re: Question on Deamons

    lak wrote:

    > When I write a daemon it is consuming more memory. But the system
    > daemons are not like that. How can I write a daemon that should
    > consume less memory?


    If your daemon itself allocates much memory, try to reduce
    the memory allocated by malloc(2) or something like that.
    Improve your algorithm.

    If your daemon leaks memory, then try to find out where it leaks
    and fix it. valgrind may help.


+ Reply to Thread