Thoughts on memory freeing



In languages, you end up having 'garbage collecting' methods for freeing
memory, and the other kind (I don't know the term off the top of my head,
but it's seen in C/C++ and done by directly calling the memory deallocation
function).

There's arguments as to which is better for a program, and a lot of what
I've seen points to the GC methods. If you are using a language where GC is
nontrivial, would it be advantage to have a memory deallocation thread? By
that I mean, rather than directly deallocate (i.e. a free call), call
something which will put the memory free'ing on another thread (either by
placing it on a to-be-deleted queue - which would have delays due to
locks/mutexes, or by running each deallocation in it's own thread - which
would have the thread creation overhead).

Does anyone have any thoughts (or better yet, suggestions for good reading,
preferably of the dead-tree kind, that I could pick up at the library) on
this?

Thanks.


.



Relevant Pages

  • Re: Thoughts on memory freeing
    ... memory, and the other kind (I don't know the term off the top of my head, but it's seen in C/C++ and done by directly calling the memory deallocation function). ... If you are using a language where GC is nontrivial, would it be advantage to have a memory deallocation thread? ...
    (comp.programming)
  • Re: strange memory leak problem
    ... The DLL here I am talking about is the COM ... And the final memory deallocation is done in the COM object ...
    (microsoft.public.vc.mfc)
  • Re: NAS alternative to my junky Airport Extreme
    ... most European languages, won't it? ... memory moving their contents at once -- of 9 and other sizes. ... Hungarian and German both use umlauts. ... What accents do other languages put on the letter A? ...
    (uk.comp.sys.mac)
  • Re: Words on the heap
    ... Forth programs tend to be significantly smaller than equivalent functionality coded in other languages. ... The major reason is that it is optimized to encourage great modularity, so there is much higher code density. ... even on very memory-constrained platforms there is far less incentive to re-use dictionary space. ... On today's PC-type platforms, there is typically such a vast amount of memory available that, with Forth's natural memory conservation, it simply isn't sufficiently attractive to be able to discard portions of the dictionary. ...
    (comp.lang.forth)
  • Re: memory allocation questions (newbie)
    ... I think this means something like "a pointer that is ... prepared to point to a memory location big enough to hold an int." ... I think having multiple exit points is not a good idea. ... experience writing programs in high-level languages. ...
    (comp.lang.c)