LINUX.IE, website of the Irish Linux Users' Group
Tux rules!

   
Home
New Users
Articles
Download
Projects
Community
Vendors

  Print Version
Email to...
 
Archives:


planetILUG

Recent News

News Archive


Join the
ILUG
on FaceBook


Join the
ILUG
on LinkedIn


Join the
ILUG SETI
Group



















 
 :: Mailing Lists

[ILUG] thoughts on malloc...

[ILUG] thoughts on malloc...

Nick Murtagh murtaghn at tcd.ie
Tue Mar 26 19:32:24 GMT 2002


On Tuesday 26 March 2002 19:23, Ronan wrote:
> On March 26, murtaghn at tcd.ie said:
> > is a big improvement but not ideal (probably as good as you'll get in C I
> > imagine).
>
> Well, no. There are better memory management systems for C than
> relying on malloc, such as garbage collection systems, and the time

That's a good point. But I was referring to the scope of the discussion.

> spent making sure you've tracked down every malloc'd block and free'd
> it can be otherwise spent improving your code. Personally, I like
> Perl's memory management, since I have no idea how it operates and
> IMHO that's pretty much the way memory management should be - unless,
> of course, you're coding for a highly restrictive environment, I
> guess.

I wouldn't agree there. The programmer needs to know the semantics of the
memory management system, otherwise it can get confusing. You need to 
know if objects are passed by reference or by value, when things get deleted
and so on. I don't know how perl works either - and I don't use it for that
and many other reasons :)

Java and C++ can look very similar at times, but because the memory management
is so different, you don't want to get them mixed up.

Also, if you don't have a rough idea what the MM is doing, you may 
inadvertantly write very memory intensive code, with lots of extra object 
creation and copying, for example. Always a danger in Java if you don't think 
about it.




More information about the ILUG mailing list
Read this without the formatting.
                                                                                                    

 

Hosted by HEAnet


Maintained by the ILUG website team. The aim of Linux.ie is to support and help commercial and private users of Linux in Ireland. You can display ILUG news in your own webpages, read backend information to find out how. Networking services kindly provided by HEAnet, server kindly donated by Dell. Linux is a trademark of Linus Torvalds, used with permission. No penguins were harmed in the production or maintenance of this highly praised website. Looking for the Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!
RSS Version
Powered by Dell