Comparing gc to malloc, Operating System

Garbage collectors trade space for time. If we collect all the time (which requires a lot of processing time), the GC allocator will use the least memory possible. On the other hand, if we have a lot of space to use, we can collect very infrequently and thus be very fast. In general, with enough extra memory, GC can take almost no extra time extra, when compared to explicit memory management. For example, if we are willing to spend 4x more space than usual, garbage collection can run as fast as explicit memory management; if, on the other hand, we don't give it too much space, it will have to run very frequently and thus will demand much more processing time than
explicit memory management.

Faced with this tradeoff, when should we use a garbage collector instead of manual memory management? Generally, use a garbage collector 1) if you have lots of memory; and 2) if we really want to avoid bugs or extra programming effort related to memory management. If, however, hardware resources are the limiting factor and programmer resources are less of a limiting factor, then manual memory management is probably a better idea.

Posted Date: 3/13/2013 3:02:52 AM | Location : United States







Related Discussions:- Comparing gc to malloc, Assignment Help, Ask Question on Comparing gc to malloc, Get Answer, Expert's Help, Comparing gc to malloc Discussions

Write discussion on Comparing gc to malloc
Your posts are moderated
Related Questions
Discuss in detail Table management Techniques?     An Assembler employs the subsequent tables: OPTAB: Operation Code Table consists of mnemonic operation code and its machi

What are the operations of processes? Process creation A process may create several new processes. The creating process is called as parent process, where as the new proce

What is meant by context switch? Switching the CPU to another process needs saving the state of the old process and loading the saved state for the latest process. This task is

Front page We need to continue or customization and documentation of our system. Currently our system boots into runlevel 5 and we need it to boot into runlevel 3. For future r

Purpose This is intended to help you develop your understanding of shell scripting in both a Windows and Unix environment. Deliverables For both the first and second op

I am not getting what you have tried to describe here. Can you elaborate more about this, i will be thankful to you. Vinay

What is critical section? Every process has a segment code called the critical section, in which the process may be updating tables, changing variables, writing file and etc. W

Determine the syntax of the assembler directive EQU The following is syntax of the assembler directive EQU: EQU

Regard as a computer system that runs 5000 jobs per month with no deadlock-prevention or deadlock-avoidance scheme. Deadlocks take place about twice per month and the operator must

Discuss the concepts of  task decomposition  and  data decomposition  within the context of parallel programming. Parallel programming or parrelel computing is the simultaneo