Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (
Help us improve Python packaging - Donate today!

Python tool for diagnosing memory leaks.

Project Description

A SmartFile Open Source project. Read more about how SmartFile uses and contributes to Open Source software.


This package consists of a library and command line tool. The library allows you to dump the Python objects in memory to a dump file.

The command line tool is used to examine the dump file contents.

Creating a dump file.

To add memory dump capability to one of your Python applications, import the caulk library and register a signal handler.

import caulk


A number of kwargs can control the operation of the signal handler.

  • signum - The signal to react to, signal.SIGUSR1 by default.
  • path - The path to which to write the dump file /var/tmp by default.
  • name - The name of the dump file, ‘caulk’ by default..

A dump file’s name will be: ‘{0}-{1}-{2}.dump’.format(name, pid, time).

To generate a dump file, use kill:

# kill -usr1 <pid>

Where <pid> is the pid of your running application.

You can also use the low-level API to generate a dump file directly instead of relying on a signal handler.

import caulk


Examining a dump file.

To examine the dump file, use the caulk command.

# caulk --classes /var/tmp/caulk-1025-1346255743.435316.dump
count total  average min/max   class
4     256    64      64/64     unittest.suite.TestSuite
1     64     64      64/64     unittest.runner._WritelnDecorator
1     64     64      64/64     site._Helper

For more information on using the caulk command, see it’s help.

# caulk --help

Release History

This version
History Node


History Node


History Node


History Node


History Node


Supported By

Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Google Google Cloud Servers DreamHost DreamHost Log Hosting