Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

How is memory managed in python?

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


Please Help Members By Posting Answers For Below Questions

What is setuptools in python?

829


What is the best free ide for python?

748


What happens in the background when you run a python file?

977


What is __ pycache __?

872


How do you check whether the two variables are pointing to the same object in python?

800


How can you sort a list?

951


I am trying to get into IT companies. I am finding it very difficult to have it. Don't know at what place I am lacking. At least, if some interviews get conducted, there is a chance of understanding it a bit. Some of my friends are working as fake in IT and they said, HR and other conducting people are not even opening the request posted by freshers, while being a fresher, it is making me very stressed. Even I applied at many companies but not getting response. I asked from my friends about my resume because I was worrying whether I am making mistakes in representing myself but they said it is okay enough. Now coming to education, I have completed M.Tech., GATE(2 times), NET, Research Paper in IEEE international conference (accepted and in process to be published) etc. While submitting the resume, I am mentioning the projects and link of codes that I have done. Still I am only getting the calls from BPO and Voice support that is completely irrelevant for me. There are my seniors who are getting more than 100K per month, they say, I am better than they are based on my education and what ever they observed, it makes me feel better for a moment but still I am not confident enough because I don't have actual idea of working in industry. The more important is, I am jobless and not getting opportunity to start my career. Now I am thinking to hide my degree and other qualifications, and producing fake experience certificate of 2+ years. Putting fake is making me feel guilty and uncomfortable but I have no other choice. Can somebody please suggest me whether I should do it or not? Your suggestions are valuable for me. I am thankful to all of you!

1202


Do you need __ init __?

903


How do you write if else in python?

876


What is python mapping?

926


Tell me what is the difference between list and tuple?

884


What are the difference between python and java?

976


Why is python weakly typed?

737


How to get current directory using python?

920


What are the best sites to learn python?

881