SlideShare a Scribd company logo
1 of 77
Download to read offline
BASICS OF MEMORY
MANAGEMENT IN PYTHON
Nina Zakharenko
WHY SHOULD YOU CARE?
Knowing about memory
management helps you write more
efficient code.
WHAT WILL YOU GET?
∎Vocabulary
∎Basic Concepts
∎Foundation
WHAT WON’T YOU GET?
You won’t be an expert at the end
of this talk.
WHAT’S A
VARIABLE?
What’s a C-style variable?
Memory
variable location Value
a 0x3E8 101
b 0x3E9 101
These values live in a fixed
size bucket.
Can only hold same-sized
data, or an overflow occurs.
What’s a C-style variable?
Memory
location Value
0x3E8 101
0x3E9 101
Later…
110
The data in this
memory location is
overwritten.
PYTHON
HAS NAMES,
NOT
VARIABLES
How are python objects stored in memory?
names
references
objects
A name is just a label
for an object.
In python, each object can have
lots of names.
Simple
• numbers
• strings
Different Types of Objects
Containers
•dict	
•list	
• user defined-
classes
What is a reference?
A name or a container object
pointing at another object.
What is a
reference count?
How can we increase the ref count?
300x	=	300
x
references:	1
+1
How can we increase the ref count?
300
x	=	300	
y	=	300
x
references:	2
y
+1
How can we increase the ref count?
300
z	=	[300,	300]
x
references:	4
y
Decrease Ref Count - del
300
x	=	300	
y	=	300	
del	x
references:	1
yx
What does del	do?
The del statement doesn’t delete
objects.
It:
• removes that name as a reference
to that object
• reduces the ref count by 1
Decrease Ref Count - Change Reference
x	=	300	
y	=	300 300
references:0
yy	=	None
Decrease Ref Count - Going out of Scope
def	print_word():	
				word	=	'Seven'	
				print('Word	is	'	+	word)	
ref count +1
‘seven’ is out of
scope.
ref count -1
print_word()
local vs. global namespace
■If refcounts decrease when an object
goes out of scope, what happens to
objects in the global namespace?
■Never go out of scope! Refcount
never reaches 0.
■Avoid putting large or complex
objects in the global namespace.
Every python object
holds 3 things
∎Its type
∎Its value
∎A reference count
PyObject
type integer
refcount 2
value 300
Names References
x
y
x	=	300	
y	=	300
print(	id(x)	)	
>	28501818
print(	id(y)	)	
>	28501818
print	x	is	y	
>	True
* don’t try this in an interactive
environment (REPL)
GARBAGE
COLLECTION
What is Garbage
Collection?
A way for a program to
automatically release memory
when the object taking up that
space is no longer in use.
Two Main Types of Garbage Collection
Reference
Counting
Tracing
How does reference counting garbage
collection work?
Add and Remove References
Refcount Reaches 0
Cascading Effect
The Good
• Easy to Implement
• When refcount is 0,
objects are
immediately deleted.
Reference Counting Garbage Collection
The Bad
• space overhead -
reference count is
stored for every object
• execution overhead -
reference count
changed on every
assignment
The Ugly
• Not generally thread safe
• Reference counting doesn’t detect cyclical
references
Reference Counting Garbage Collection
Cyclical References By Example
class	Node:	
				def	__init__(self,	value):	
								self.value	=	value	
				def	next(self,	next):	
								self.next	=	next
What’s a cyclical reference?
left right
root rc = 1
rc = 3 rc = 2
root	=	Node('root')	
left	=	Node('left')	
right	=	Node(‘right')	
root.next(left)	
left.next(right)	
right.next(left)
What’s a cyclical reference?
del	root	
del	node1	
del	node2
left right
root rc = 0
rc = 1 rc = 1
Reference counting alone will not
garbage collect objects with cyclical
references.
Two Main Types of Garbage Collection
Reference
Counting
Tracing
Tracing Garbage Collection
■source: http://webappguru.blogspot.com/2015/11/mark-and-sweep-garbage-collection.html
Tracing Garbage Collection
■source: http://webappguru.blogspot.com/2015/11/mark-and-sweep-garbage-collection.html
What does Python use?
Reference
Counting
Generational+
Generational Garbage Collection is
based on the theory that most
objects die young.
■ source: http://cs.ucsb.edu/~ckrintz/racelab/gc/papers/hoelzle-jvm98.pdf
Python maintains a list of every object
created as a program is run.
Actually, it makes 3.
generation 0
generation 1
generation 2
Newly created objects are stored in generation 0.
Only container objects with a
refcount greater than 0 will be
stored in a generation list.
When the number of objects in a
generation reaches a threshold,
python runs a garbage collection
algorithm on that generation, and
any generations younger than it.
What happens during a generational garbage
collection cycle?
Python makes a list for objects to discard.
It runs an algorithm to detect reference cycles.
If an object has no outside references, it’s put on
the discard list.
When the cycle is done, it frees up the objects on
the discard list.
After a garbage collection cycle,
objects that survived will be
promoted to the next generation.
Objects in the last generation (2)
stay there as the program executes.
When the ref count reaches 0, you
get immediate clean up.
If you have a cycle, you need to wait
for garbage collection.
REFERENCE
COUNTING
GOTCHAS
Reference counting is not generally
thread-safe.
We’ll see why this is a big deal™
later.
Remember our cycle from before?
left rightrc = 1 rc = 1
Cyclical references get cleaned up
by generational garbage collection.
Cyclical Reference Cleanup
Except in python2 if they have a
__del__	method.
**fixed in python 3.4! - https://www.python.org/dev/peps/pep-0442/
Gotcha!
The __del__	magic method
■ Sometimes called a “destructor”
■Not the del statement.
■ Runs before an object is removed
from memory
__slots__
What are __slots__?
class	Dog(object):	
				pass	
buddy	=	Dog()	
buddy.name	=	'Buddy'
print(buddy.__dict__)	
{'name':	'Buddy'}
What are __slots__?
'Pug'.name	=	'Fred'
AttributeError																													
Traceback	(most	recent	call	last)	
---->	1	'Pug'.name	=	'Fred'	
AttributeError:	'str'	object	has	no	attribute	
'name'
class	Point(object):	
				__slots__	=	('x',	'y')
What are __slots__?
What is the
type of
__slots__?
point.name	=	"Fred"	
Traceback	(most	recent	call	last):	
		File	"point.py",	line	8,	in	<module>	
				point.name	=	"Fred"	
AttributeError:	'Point'	object	has	no	attribute	
'name'
point	=	Point()	
point.x	=	5	
point.y	=	7
size of dict vs. size of tuple
import	sys	
sys.getsizeof(dict())	
sys.getsizeof(tuple())	
sizeof dict: 288 bytes
sizeof tuple: 48 bytes
When would we want to use __slots__?
■ If we’re going to be creating many
instances of a class
■If we know in advance what
properties the class should have
WHAT’S A
GIL?
GLOBAL
INTERPETER
LOCK
Only one thread can run in the
interpreter at a time.
Upside
Fast & Simple Garbage Collection
Advantages / Disadvantages of a GIL
Downside
In a python program, no matter how many
threads exist, only one thread will be
executed at a time.
■Use multi-processing instead of multi-
threading.
■Each process will have it’s own GIL, it’s
on the developer to figure out a way to
share information between processes.
Want to take advantage of multiple CPUs?
If the GIL limits us,
can’t we just remove
it?
additional reading: https://docs.python.org/3/faq/library.html#can-t-we-get-rid-of-the-global-interpreter-lock
For better or for
worse, the GIL is
here to stay!
WHAT DID
WE LEARN?
Garbage collection is
pretty good.
Now you know how
memory is managed.
Consider
python3
Or, for scientific
applications numpy
& pandas.
Thanks!
@nnja
nina.writes.code@gmail.com
[TODO SLIDESHARE LINK]
Bonus
Material
Additional Reading
• Great explanation of generational garbage collection and python’s
reference detection algorithm.
• https://www.quora.com/How-does-garbage-collection-in-Python-
work
• Weak Reference Documentation
• https://docs.python.org/3/library/weakref.html
• Python Module of the Week - gc
• https://pymotw.com/2/gc/
• PyPy STM - GIL less Python Interpreter
• http://morepypy.blogspot.com/2015/03/pypy-stm-251-
released.html
• Saving 9GB of RAM with python’s __slots__
• http://tech.oyster.com/save-ram-with-python-slots/
Getting in-depth with the GIL
• Dave Beazley - Guide on how the GIL Operates
• http://www.dabeaz.com/python/GIL.pdf
• Dave Beazley - New GIL in Python 3.2
• http://www.dabeaz.com/python/NewGIL.pdf
• Dave Beazley - Inside Look at Infamous GIL Patch
• http://dabeaz.blogspot.com/2011/08/inside-look-at-gil-
removal-patch-of.html
Why can’t we use the REPL to follow along at
home?
• Because It doesn’t behave like a typical python
program that’s being executed.
• Further reading: http://stackoverflow.com/questions/
25281892/weird-id-result-on-cpython-intobject
PYTHON PRE-LOADS OBJECTS
• Many objects are loaded by Python as the interpreter
starts.
• Called peephole optimization.
• Numbers: -5 -> 256
• Single Letter Strings
• Common Exceptions
• Further reading: http://akaptur.com/blog/2014/08/02/
the-cpython-peephole-optimizer-and-you/
Common Question - Why doesn’t python a
python program shrink in memory after garbage
collection?
• The freed memory is fragmented.
• i.e. It’s not freed in one continuous block.
• When we say memory is freed during garbage
collection, it’s released back to python to use
for other objects, and not necessarily to the
system.
• After garbage collection, the size of the
python program likely won’t go down.
PyListObject
type list
refcount 1
value
size 3
capacity 10
nums
Value -10
refcount 1
type integer
PyObject
Value -9
refcount 2
type integer
PyObject
How does python store container objects?
Credits
Big thanks to:
• Faris Chebib & The Salt Lake City Python Meetup
• The many friends & co-workers who lent me their eyes &
ears, particularly Steve Holden
Special thanks to all the people who made and released
these awesome resources for free:
■ Presentation template by SlidesCarnival
■ Photographs by Unsplash
■ Icons by iconsdb
Basics of Memory Management in Python - Under 40 Characters

More Related Content

What's hot

Python for Big Data Analytics
Python for Big Data AnalyticsPython for Big Data Analytics
Python for Big Data AnalyticsEdureka!
 
Extreme JavaScript Performance
Extreme JavaScript PerformanceExtreme JavaScript Performance
Extreme JavaScript PerformanceThomas Fuchs
 
Mixing C++ & Python II: Pybind11
Mixing C++ & Python II: Pybind11Mixing C++ & Python II: Pybind11
Mixing C++ & Python II: Pybind11corehard_by
 
Python Tutorial For Beginners | Python Crash Course - Python Programming Lang...
Python Tutorial For Beginners | Python Crash Course - Python Programming Lang...Python Tutorial For Beginners | Python Crash Course - Python Programming Lang...
Python Tutorial For Beginners | Python Crash Course - Python Programming Lang...Edureka!
 
Introduction to Big Data
Introduction to Big Data Introduction to Big Data
Introduction to Big Data Srinath Perera
 
Introduction to python
Introduction to pythonIntroduction to python
Introduction to pythonYi-Fan Chu
 
Optimizing Delta/Parquet Data Lakes for Apache Spark
Optimizing Delta/Parquet Data Lakes for Apache SparkOptimizing Delta/Parquet Data Lakes for Apache Spark
Optimizing Delta/Parquet Data Lakes for Apache SparkDatabricks
 
Data Science With Python | Python For Data Science | Python Data Science Cour...
Data Science With Python | Python For Data Science | Python Data Science Cour...Data Science With Python | Python For Data Science | Python Data Science Cour...
Data Science With Python | Python For Data Science | Python Data Science Cour...Simplilearn
 
Grafana is not enough: DIY user interfaces for Prometheus
Grafana is not enough: DIY user interfaces for PrometheusGrafana is not enough: DIY user interfaces for Prometheus
Grafana is not enough: DIY user interfaces for PrometheusWeaveworks
 
What is the best full text search engine for Python?
What is the best full text search engine for Python?What is the best full text search engine for Python?
What is the best full text search engine for Python?Andrii Soldatenko
 
Introduction to HBase - NoSqlNow2015
Introduction to HBase - NoSqlNow2015Introduction to HBase - NoSqlNow2015
Introduction to HBase - NoSqlNow2015Apekshit Sharma
 
Introduction to Metadata
Introduction to MetadataIntroduction to Metadata
Introduction to MetadataEUDAT
 
Introduction to python 3
Introduction to python 3Introduction to python 3
Introduction to python 3Youhei Sakurai
 
Python Programming with Google Colab
Python Programming with Google ColabPython Programming with Google Colab
Python Programming with Google Colabvadhaniseetharaman
 
Apache Spark Data Source V2 with Wenchen Fan and Gengliang Wang
Apache Spark Data Source V2 with Wenchen Fan and Gengliang WangApache Spark Data Source V2 with Wenchen Fan and Gengliang Wang
Apache Spark Data Source V2 with Wenchen Fan and Gengliang WangDatabricks
 
ClickHouse new features and development roadmap, by Aleksei Milovidov
ClickHouse new features and development roadmap, by Aleksei MilovidovClickHouse new features and development roadmap, by Aleksei Milovidov
ClickHouse new features and development roadmap, by Aleksei MilovidovAltinity Ltd
 
Understanding Parallelization of Machine Learning Algorithms in Apache Spark™
Understanding Parallelization of Machine Learning Algorithms in Apache Spark™Understanding Parallelization of Machine Learning Algorithms in Apache Spark™
Understanding Parallelization of Machine Learning Algorithms in Apache Spark™Databricks
 

What's hot (20)

Python for Big Data Analytics
Python for Big Data AnalyticsPython for Big Data Analytics
Python for Big Data Analytics
 
Extreme JavaScript Performance
Extreme JavaScript PerformanceExtreme JavaScript Performance
Extreme JavaScript Performance
 
Mixing C++ & Python II: Pybind11
Mixing C++ & Python II: Pybind11Mixing C++ & Python II: Pybind11
Mixing C++ & Python II: Pybind11
 
Python Tutorial For Beginners | Python Crash Course - Python Programming Lang...
Python Tutorial For Beginners | Python Crash Course - Python Programming Lang...Python Tutorial For Beginners | Python Crash Course - Python Programming Lang...
Python Tutorial For Beginners | Python Crash Course - Python Programming Lang...
 
Introduction to Big Data
Introduction to Big Data Introduction to Big Data
Introduction to Big Data
 
Introduction to python
Introduction to pythonIntroduction to python
Introduction to python
 
Optimizing Delta/Parquet Data Lakes for Apache Spark
Optimizing Delta/Parquet Data Lakes for Apache SparkOptimizing Delta/Parquet Data Lakes for Apache Spark
Optimizing Delta/Parquet Data Lakes for Apache Spark
 
Data Science With Python | Python For Data Science | Python Data Science Cour...
Data Science With Python | Python For Data Science | Python Data Science Cour...Data Science With Python | Python For Data Science | Python Data Science Cour...
Data Science With Python | Python For Data Science | Python Data Science Cour...
 
Grafana is not enough: DIY user interfaces for Prometheus
Grafana is not enough: DIY user interfaces for PrometheusGrafana is not enough: DIY user interfaces for Prometheus
Grafana is not enough: DIY user interfaces for Prometheus
 
What is the best full text search engine for Python?
What is the best full text search engine for Python?What is the best full text search engine for Python?
What is the best full text search engine for Python?
 
Big data PPT
Big data PPT Big data PPT
Big data PPT
 
Introduction to HBase - NoSqlNow2015
Introduction to HBase - NoSqlNow2015Introduction to HBase - NoSqlNow2015
Introduction to HBase - NoSqlNow2015
 
Introduction to Metadata
Introduction to MetadataIntroduction to Metadata
Introduction to Metadata
 
Introduction to python 3
Introduction to python 3Introduction to python 3
Introduction to python 3
 
PySaprk
PySaprkPySaprk
PySaprk
 
Python Programming with Google Colab
Python Programming with Google ColabPython Programming with Google Colab
Python Programming with Google Colab
 
Apache Spark Data Source V2 with Wenchen Fan and Gengliang Wang
Apache Spark Data Source V2 with Wenchen Fan and Gengliang WangApache Spark Data Source V2 with Wenchen Fan and Gengliang Wang
Apache Spark Data Source V2 with Wenchen Fan and Gengliang Wang
 
ClickHouse new features and development roadmap, by Aleksei Milovidov
ClickHouse new features and development roadmap, by Aleksei MilovidovClickHouse new features and development roadmap, by Aleksei Milovidov
ClickHouse new features and development roadmap, by Aleksei Milovidov
 
Understanding Parallelization of Machine Learning Algorithms in Apache Spark™
Understanding Parallelization of Machine Learning Algorithms in Apache Spark™Understanding Parallelization of Machine Learning Algorithms in Apache Spark™
Understanding Parallelization of Machine Learning Algorithms in Apache Spark™
 
Numpy Talk at SIAM
Numpy Talk at SIAMNumpy Talk at SIAM
Numpy Talk at SIAM
 

Viewers also liked

Object-oriented Programming in Python
Object-oriented Programming in PythonObject-oriented Programming in Python
Object-oriented Programming in PythonJuan-Manuel Gimeno
 
How to successfully grow a code review culture
How to successfully grow a code review cultureHow to successfully grow a code review culture
How to successfully grow a code review cultureNina Zakharenko
 
Everything You Always Wanted to Know About Memory in Python - But Were Afraid...
Everything You Always Wanted to Know About Memory in Python - But Were Afraid...Everything You Always Wanted to Know About Memory in Python - But Were Afraid...
Everything You Always Wanted to Know About Memory in Python - But Were Afraid...Piotr Przymus
 
Learn 90% of Python in 90 Minutes
Learn 90% of Python in 90 MinutesLearn 90% of Python in 90 Minutes
Learn 90% of Python in 90 MinutesMatt Harrison
 
Nina Zakharenko - Introduction to Git - Start SLC 2015
Nina Zakharenko - Introduction to Git - Start SLC 2015Nina Zakharenko - Introduction to Git - Start SLC 2015
Nina Zakharenko - Introduction to Git - Start SLC 2015Nina Zakharenko
 
Djangocon 2014 angular + django
Djangocon 2014 angular + djangoDjangocon 2014 angular + django
Djangocon 2014 angular + djangoNina Zakharenko
 
Djangocon 2014 - Django REST Framework - So Easy You Can Learn it in 25 Minutes
Djangocon 2014 - Django REST Framework - So Easy You Can Learn it in 25 MinutesDjangocon 2014 - Django REST Framework - So Easy You Can Learn it in 25 Minutes
Djangocon 2014 - Django REST Framework - So Easy You Can Learn it in 25 MinutesNina Zakharenko
 
Parallel programming using python
Parallel programming using python Parallel programming using python
Parallel programming using python Samah Gad
 
How to Use Multi-thread & Multi-process in Python
How to Use Multi-thread & Multi-process in PythonHow to Use Multi-thread & Multi-process in Python
How to Use Multi-thread & Multi-process in PythonSpeedyCloud
 
Science Exams Study Questions
Science Exams Study QuestionsScience Exams Study Questions
Science Exams Study Questionsalexanderlin999
 
Knowing your Python Garbage Collector
Knowing your Python Garbage CollectorKnowing your Python Garbage Collector
Knowing your Python Garbage Collectorfcofdezc
 
WeakReferences (java.lang.ref and more)
WeakReferences (java.lang.ref and more)WeakReferences (java.lang.ref and more)
WeakReferences (java.lang.ref and more)Mohannad Hassan
 
Недостатки Python
Недостатки PythonНедостатки Python
Недостатки PythonPython Meetup
 
Django Interview Questions and Answers
Django Interview Questions and AnswersDjango Interview Questions and Answers
Django Interview Questions and AnswersPython Devloper
 
Object oriented programming with python
Object oriented programming with pythonObject oriented programming with python
Object oriented programming with pythonArslan Arshad
 
Multiprocessing with python
Multiprocessing with pythonMultiprocessing with python
Multiprocessing with pythonPatrick Vergain
 
Git-flow workflow and pull-requests
Git-flow workflow and pull-requestsGit-flow workflow and pull-requests
Git-flow workflow and pull-requestsBartosz Kosarzycki
 

Viewers also liked (20)

Object-oriented Programming in Python
Object-oriented Programming in PythonObject-oriented Programming in Python
Object-oriented Programming in Python
 
How to successfully grow a code review culture
How to successfully grow a code review cultureHow to successfully grow a code review culture
How to successfully grow a code review culture
 
Everything You Always Wanted to Know About Memory in Python - But Were Afraid...
Everything You Always Wanted to Know About Memory in Python - But Were Afraid...Everything You Always Wanted to Know About Memory in Python - But Were Afraid...
Everything You Always Wanted to Know About Memory in Python - But Were Afraid...
 
Learn 90% of Python in 90 Minutes
Learn 90% of Python in 90 MinutesLearn 90% of Python in 90 Minutes
Learn 90% of Python in 90 Minutes
 
Nina Zakharenko - Introduction to Git - Start SLC 2015
Nina Zakharenko - Introduction to Git - Start SLC 2015Nina Zakharenko - Introduction to Git - Start SLC 2015
Nina Zakharenko - Introduction to Git - Start SLC 2015
 
Djangocon 2014 angular + django
Djangocon 2014 angular + djangoDjangocon 2014 angular + django
Djangocon 2014 angular + django
 
Djangocon 2014 - Django REST Framework - So Easy You Can Learn it in 25 Minutes
Djangocon 2014 - Django REST Framework - So Easy You Can Learn it in 25 MinutesDjangocon 2014 - Django REST Framework - So Easy You Can Learn it in 25 Minutes
Djangocon 2014 - Django REST Framework - So Easy You Can Learn it in 25 Minutes
 
Memory Management in Python
Memory Management in PythonMemory Management in Python
Memory Management in Python
 
Parallel programming using python
Parallel programming using python Parallel programming using python
Parallel programming using python
 
How to Use Multi-thread & Multi-process in Python
How to Use Multi-thread & Multi-process in PythonHow to Use Multi-thread & Multi-process in Python
How to Use Multi-thread & Multi-process in Python
 
Science Exams Study Questions
Science Exams Study QuestionsScience Exams Study Questions
Science Exams Study Questions
 
Knowing your Python Garbage Collector
Knowing your Python Garbage CollectorKnowing your Python Garbage Collector
Knowing your Python Garbage Collector
 
WeakReferences (java.lang.ref and more)
WeakReferences (java.lang.ref and more)WeakReferences (java.lang.ref and more)
WeakReferences (java.lang.ref and more)
 
Недостатки Python
Недостатки PythonНедостатки Python
Недостатки Python
 
Python GC
Python GCPython GC
Python GC
 
Django Interview Questions and Answers
Django Interview Questions and AnswersDjango Interview Questions and Answers
Django Interview Questions and Answers
 
Object oriented programming with python
Object oriented programming with pythonObject oriented programming with python
Object oriented programming with python
 
Python Objects
Python ObjectsPython Objects
Python Objects
 
Multiprocessing with python
Multiprocessing with pythonMultiprocessing with python
Multiprocessing with python
 
Git-flow workflow and pull-requests
Git-flow workflow and pull-requestsGit-flow workflow and pull-requests
Git-flow workflow and pull-requests
 

Similar to Basics of Memory Management in Python - Under 40 Characters

Garbage collection 介紹
Garbage collection 介紹Garbage collection 介紹
Garbage collection 介紹kao kuo-tung
 
Exploring .NET memory management (iSense)
Exploring .NET memory management (iSense)Exploring .NET memory management (iSense)
Exploring .NET memory management (iSense)Maarten Balliauw
 
Jurczyk windows kernel reference count vulnerabilities. case study
Jurczyk   windows kernel reference count vulnerabilities. case studyJurczyk   windows kernel reference count vulnerabilities. case study
Jurczyk windows kernel reference count vulnerabilities. case studyDefconRussia
 
Basic of python for data analysis
Basic of python for data analysisBasic of python for data analysis
Basic of python for data analysisPramod Toraskar
 
Python memory managment. Deeping in Garbage collector
Python memory managment. Deeping in Garbage collectorPython memory managment. Deeping in Garbage collector
Python memory managment. Deeping in Garbage collectorJose Manuel Ortega Candel
 
Managing Memory in Swift (Yes, that's a thing)
Managing Memory in Swift (Yes, that's a thing)Managing Memory in Swift (Yes, that's a thing)
Managing Memory in Swift (Yes, that's a thing)Carl Brown
 
Objective-C: a gentle introduction
Objective-C: a gentle introductionObjective-C: a gentle introduction
Objective-C: a gentle introductionGabriele Petronella
 
A peek into Python's Metaclass and Bytecode from a Smalltalk User
A peek into Python's Metaclass and Bytecode from a Smalltalk UserA peek into Python's Metaclass and Bytecode from a Smalltalk User
A peek into Python's Metaclass and Bytecode from a Smalltalk UserKoan-Sin Tan
 
Rails Tips and Best Practices
Rails Tips and Best PracticesRails Tips and Best Practices
Rails Tips and Best PracticesDavid Keener
 
.NET UY Meetup 7 - CLR Memory by Fabian Alves
.NET UY Meetup 7 - CLR Memory by Fabian Alves.NET UY Meetup 7 - CLR Memory by Fabian Alves
.NET UY Meetup 7 - CLR Memory by Fabian Alves.NET UY Meetup
 
C++ Introduction brown bag
C++ Introduction brown bagC++ Introduction brown bag
C++ Introduction brown bagJacob Green
 
The Web Application Hackers Toolchain
The Web Application Hackers ToolchainThe Web Application Hackers Toolchain
The Web Application Hackers Toolchainjasonhaddix
 
Python and Zope: An introduction (May 2004)
Python and Zope: An introduction (May 2004)Python and Zope: An introduction (May 2004)
Python and Zope: An introduction (May 2004)Kiran Jonnalagadda
 
DEF CON 27 - DIMITRY SNEZHKOV - zombie ant farm practical tips
DEF CON 27 - DIMITRY SNEZHKOV - zombie ant farm practical tipsDEF CON 27 - DIMITRY SNEZHKOV - zombie ant farm practical tips
DEF CON 27 - DIMITRY SNEZHKOV - zombie ant farm practical tipsFelipe Prado
 
Vulnerability, exploit to metasploit
Vulnerability, exploit to metasploitVulnerability, exploit to metasploit
Vulnerability, exploit to metasploitTiago Henriques
 
Memory Management in RubyMotion
Memory Management in RubyMotionMemory Management in RubyMotion
Memory Management in RubyMotionMichael Denomy
 

Similar to Basics of Memory Management in Python - Under 40 Characters (20)

Garbage collection 介紹
Garbage collection 介紹Garbage collection 介紹
Garbage collection 介紹
 
Exploring .NET memory management (iSense)
Exploring .NET memory management (iSense)Exploring .NET memory management (iSense)
Exploring .NET memory management (iSense)
 
Jurczyk windows kernel reference count vulnerabilities. case study
Jurczyk   windows kernel reference count vulnerabilities. case studyJurczyk   windows kernel reference count vulnerabilities. case study
Jurczyk windows kernel reference count vulnerabilities. case study
 
Basic of python for data analysis
Basic of python for data analysisBasic of python for data analysis
Basic of python for data analysis
 
Python memory managment. Deeping in Garbage collector
Python memory managment. Deeping in Garbage collectorPython memory managment. Deeping in Garbage collector
Python memory managment. Deeping in Garbage collector
 
Intro to Python
Intro to PythonIntro to Python
Intro to Python
 
Managing Memory in Swift (Yes, that's a thing)
Managing Memory in Swift (Yes, that's a thing)Managing Memory in Swift (Yes, that's a thing)
Managing Memory in Swift (Yes, that's a thing)
 
Eusecwest
EusecwestEusecwest
Eusecwest
 
Objective-C: a gentle introduction
Objective-C: a gentle introductionObjective-C: a gentle introduction
Objective-C: a gentle introduction
 
A peek into Python's Metaclass and Bytecode from a Smalltalk User
A peek into Python's Metaclass and Bytecode from a Smalltalk UserA peek into Python's Metaclass and Bytecode from a Smalltalk User
A peek into Python's Metaclass and Bytecode from a Smalltalk User
 
Rails Tips and Best Practices
Rails Tips and Best PracticesRails Tips and Best Practices
Rails Tips and Best Practices
 
.NET UY Meetup 7 - CLR Memory by Fabian Alves
.NET UY Meetup 7 - CLR Memory by Fabian Alves.NET UY Meetup 7 - CLR Memory by Fabian Alves
.NET UY Meetup 7 - CLR Memory by Fabian Alves
 
Django at Scale
Django at ScaleDjango at Scale
Django at Scale
 
Intro
IntroIntro
Intro
 
C++ Introduction brown bag
C++ Introduction brown bagC++ Introduction brown bag
C++ Introduction brown bag
 
The Web Application Hackers Toolchain
The Web Application Hackers ToolchainThe Web Application Hackers Toolchain
The Web Application Hackers Toolchain
 
Python and Zope: An introduction (May 2004)
Python and Zope: An introduction (May 2004)Python and Zope: An introduction (May 2004)
Python and Zope: An introduction (May 2004)
 
DEF CON 27 - DIMITRY SNEZHKOV - zombie ant farm practical tips
DEF CON 27 - DIMITRY SNEZHKOV - zombie ant farm practical tipsDEF CON 27 - DIMITRY SNEZHKOV - zombie ant farm practical tips
DEF CON 27 - DIMITRY SNEZHKOV - zombie ant farm practical tips
 
Vulnerability, exploit to metasploit
Vulnerability, exploit to metasploitVulnerability, exploit to metasploit
Vulnerability, exploit to metasploit
 
Memory Management in RubyMotion
Memory Management in RubyMotionMemory Management in RubyMotion
Memory Management in RubyMotion
 

Recently uploaded

OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...Soham Mondal
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )Tsuyoshi Horigome
 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130Suhani Kapoor
 
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Christo Ananth
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130Suhani Kapoor
 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxupamatechverse
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
UNIT-III FMM. DIMENSIONAL ANALYSIS
UNIT-III FMM.        DIMENSIONAL ANALYSISUNIT-III FMM.        DIMENSIONAL ANALYSIS
UNIT-III FMM. DIMENSIONAL ANALYSISrknatarajan
 
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINESIVASHANKAR N
 
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSHARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSRajkumarAkumalla
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxpurnimasatapathy1234
 
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escortsranjana rawat
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxAsutosh Ranjan
 
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVHARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVRajaP95
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingrakeshbaidya232001
 
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)Suman Mia
 
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingUNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingrknatarajan
 

Recently uploaded (20)

OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )
 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
 
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
 
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptx
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
 
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
UNIT-III FMM. DIMENSIONAL ANALYSIS
UNIT-III FMM.        DIMENSIONAL ANALYSISUNIT-III FMM.        DIMENSIONAL ANALYSIS
UNIT-III FMM. DIMENSIONAL ANALYSIS
 
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
 
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSHARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptx
 
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptx
 
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVHARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writing
 
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
 
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingUNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
 

Basics of Memory Management in Python - Under 40 Characters