I was ignorant. An hour ago, I thought it is impossible to implement a garbage collector (GC) for C, but this is certainly wrong.
For an interpretated language like Perl, it is cheap to keep track of memory that is not referenced and therefore it is not so hard to identify and free unused memory in [...]
Posts Tagged ‘memory management’
Garbage Collection for C
Posted in development, tagged C, memory management, programming on August 20, 2008 | Leave a Comment »
Memory Allocation on the Heap vs. on the Stack
Posted in development, tagged memory management, programming on August 20, 2008 | Leave a Comment »
This topic sounds pretty elementary, but I did not know the difference a week ago. Just explain it here as a record. You may also want to have a look at this page.
Memory can be allocated on the heap or on the stack. When a program calls malloc() family, the memory will be allocated on [...]
Mastering C Pointers (or not)?
Posted in development, tagged C, memory management, myprog, programming, tutorial on August 20, 2008 | 3 Comments »
C pointer is the most powerful and nasty concept. Whether marstering C points or not separate intermediate C programers from the elementary ones. Want to know whether you have mastered C pointers? Have a look at this program. If the basic idea is clear to you, you are qualified to be an intermediate programmer. If [...]