From: Luciano Moreira - igLnx <lucianolnx@ig.com.br>
To: Micha Feigin <michf@post.tau.ac.il>
Cc: linux-c-programming@vger.kernel.org
Subject: Re: Newbie question on malloc()
Date: Thu, 03 Jun 2004 04:23:54 -0300 [thread overview]
Message-ID: <40BED20A.2080207@ig.com.br> (raw)
In-Reply-To: <20040603012832.GC2562@luna.mooo.com>
My suggests (I expect that it's commom):
If you are making a app for your personal brief use (like a brief tool),
OK !!
You can leave OS to control your auto-"freed" memory.
else
You need to free your allocated memory by yorself (either by itself
<---- your app).
Luciano.
----------
- Try to use "free()" or "delete".
- app = (your) application/software.
Micha Feigin wrote:
>On Wed, Jun 02, 2004 at 08:48:07PM +0900, Wen Guangcheng wrote:
>
>
>>Hello Gurus,
>>I have made a daemon in which dynamic memory is gotten
>>by malloc(). Does the memory get free automatically without
>>free() by the deamon when the daemon process is killed?
>>Thanks in advance.
>>
>>
>>
>
>It does, but in general its not in good practice to count on process
>exit for freeing memory (a good way to get memory leaks).
>
>
>
>>--Wen
>>
>>-
>>To unsubscribe from this list: send the line "unsubscribe linux-c-programming" in
>>the body of a message to majordomo@vger.kernel.org
>>More majordomo info at http://vger.kernel.org/majordomo-info.html
>>
>> +++++++++++++++++++++++++++++++++++++++++++
>> This Mail Was Scanned By Mail-seCure System
>> at the Tel-Aviv University CC.
>>
>>
>>
>-
>To unsubscribe from this list: send the line "unsubscribe linux-c-programming" in
>the body of a message to majordomo@vger.kernel.org
>More majordomo info at http://vger.kernel.org/majordomo-info.html
>
>
>
>
next prev parent reply other threads:[~2004-06-03 7:23 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-06-02 11:48 Newbie question on malloc() Wen Guangcheng
2004-06-02 17:08 ` John T. Williams
2004-06-02 17:41 ` Glynn Clements
2004-06-02 17:52 ` John T. Williams
2004-06-03 7:41 ` Glynn Clements
2004-06-03 11:32 ` Micha Feigin
2004-06-04 2:11 ` Glynn Clements
2004-06-04 12:31 ` Micha Feigin
2004-06-02 18:37 ` Jan-Benedict Glaw
2004-06-03 1:34 ` Micha Feigin
2004-06-03 19:42 ` Jan-Benedict Glaw
2004-06-03 23:44 ` Micha Feigin
2004-06-04 8:06 ` Jan-Benedict Glaw
2004-06-02 17:18 ` Glynn Clements
2004-06-03 1:28 ` Micha Feigin
2004-06-03 7:23 ` Luciano Moreira - igLnx [this message]
2004-06-03 7:59 ` Glynn Clements
2004-06-03 22:25 ` John T. Williams
2004-06-03 23:24 ` Paul Gimpelj
2004-06-04 0:14 ` John T. Williams
2004-06-04 2:35 ` Glynn Clements
2004-06-03 23:53 ` Glynn Clements
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=40BED20A.2080207@ig.com.br \
--to=lucianolnx@ig.com.br \
--cc=linux-c-programming@vger.kernel.org \
--cc=michf@post.tau.ac.il \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.