Answer Posted / chaitanya
Memory management in Python involves a private heap containing all Python objects and data structures. Interpreter takes care of Python heap and that the programmer has no access to it.
The allocation of heap space for Python objects is done by Python memory manager. The core API of Python provides some tools for the programmer to code reliable and more robust program.
Python also has a build-in garbage collector which recycles all the unused memory. When an object is no longer referenced by the program, the heap space it occupies can be freed. The garbage collector determines objects which are no longer referenced by the sprogram frees the occupied memory and make it available to the heap space.
The gc module defines functions to enable /disable garbage collector:
gc.enable() -Enables automatic garbage collection.
gc.disable() - Disables automatic garbage collection.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
How do I start learning python?
How to remove values to a python array?
How will you convert a string to a set in python?
What is python method?
What are python’s dictionaries?
What's a python script?
Is there a reverse function in python?
Is google written in python?
What is the output for the following code?
Do you know how memory is managed in python?
What is a tuple in python?
How do I define raw_input in python?
How can you generate random numbers in python?
What is the best python ide for beginners?
What is anaconda program?