RSS Forums RSS
Please support our C advertiser: Programming Forums

Help with memory block usage - C

Join Date: Aug 2005
Location: near St Louis, Missouri, USA
Posts: 11,861
Reputation: Ancient Dragon has much to be proud of Ancient Dragon has much to be proud of Ancient Dragon has much to be proud of Ancient Dragon has much to be proud of Ancient Dragon has much to be proud of Ancient Dragon has much to be proud of Ancient Dragon has much to be proud of Ancient Dragon has much to be proud of Ancient Dragon has much to be proud of Ancient Dragon has much to be proud of 
Rep Power: 40
Solved Threads: 1012
Moderator
Featured Poster
Ancient Dragon's Avatar
Ancient Dragon Ancient Dragon is offline Offline
Most Valuable Poster

Re: Help with memory block usage - C

  #2  
Aug 7th, 2008
If you want your own memory block to act like the memory pool allocated by malloc() then you have to write some sort of memory management functions for the pool. Use malloc() only to allocate the initial memory block. After that your program has to keep track of free blocks and used blocks. AFAIK this is normally done by use of linked list. It can get a bit complicated.
<<Hire Programmer>> << Hobby Site>>
Signature links for sale. PM me for details
Reply With Quote  
Forums | Blogs | Tutorials | Code Snippets | Whitepapers | RSS Feeds | Advertising
All times are GMT -4. The time now is 8:06 pm.
Newsletter Archive - Sitemap - Privacy Statement - Acceptable Use Policy - Contact Us
Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC