Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > C > Re: Dynamic Mem...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 12 of 20 Topic 26177 of 27695
Post > Topic >>

Re: Dynamic Memory allocation

by CBFalconer <cbfalconer@[EMAIL PROTECTED] > May 14, 2008 at 09:35 AM

smarty wrote:
> 
.... snip ...
> 
> I came across a situation where i have to find the availability
> of free dynamic memory that can be "malloc"ed. May be this is
> what a memory manager does when malloc is called. Can i implement
> this as a program? How?

Just malloc what you need and check the returned value.  If it is
NULL that memory is not available.

Some non-standard systems used to have routines to return the
amount available.  Today, most systems use virtual memory, so there
is no practical limit.

-- 
 [mail]: Chuck F (cbfalconer at maineline dot net) 
 [page]: <http://cbfalconer.home.att.net>
            Try the download section.


** Posted from http://www.teranews.com
**
 




 20 Posts in Topic:
Dynamic Memory allocation
smarty <csmgsarma@[EMA  2008-05-13 03:08:56 
Re: Dynamic Memory allocation
"Jim Langston"   2008-05-13 03:18:17 
Re: Dynamic Memory allocation
"Malcolm McLean"  2008-05-13 11:22:41 
Re: Dynamic Memory allocation
jt@[EMAIL PROTECTED] (Je  2008-05-13 10:27:56 
Re: Dynamic Memory allocation
Spiros Bousbouras <spi  2008-05-13 03:51:33 
Re: Dynamic Memory allocation
Keith Thompson <kst-u@  2008-05-13 08:59:29 
Re: Dynamic Memory allocation
"cr88192" <c  2008-05-14 09:18:56 
Re: Dynamic Memory allocation
Nick Keighley <nick_ke  2008-05-14 00:55:26 
Re: Dynamic Memory allocation
smarty <csmgsarma@[EMA  2008-05-14 02:23:21 
Re: Dynamic Memory allocation
Ian Collins <ian-news@  2008-05-14 21:33:41 
Re: Dynamic Memory allocation
"Jim Langston"   2008-05-15 09:14:53 
Re: Dynamic Memory allocation
CBFalconer <cbfalconer  2008-05-14 09:35:07 
Re: Dynamic Memory allocation
Szabolcs Borsanyi <bor  2008-05-14 08:13:40 
Re: Dynamic Memory allocation
Keith Thompson <kst-u@  2008-05-14 09:20:00 
Re: Dynamic Memory allocation
Szabolcs Borsanyi <bor  2008-05-14 09:26:18 
Re: Dynamic Memory allocation
Keith Thompson <kst-u@  2008-05-14 09:36:30 
Re: Dynamic Memory allocation
CBFalconer <cbfalconer  2008-05-14 12:28:50 
Re: Dynamic Memory allocation
sandy <sandeepksinha@[  2008-05-14 10:07:49 
Re: Dynamic Memory allocation
"Malcolm McLean"  2008-05-14 23:13:55 
Re: Dynamic Memory allocation
sandy <sandeepksinha@[  2008-05-15 00:49:01 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Tue Oct 14 11:32:25 CDT 2008.