Skip to content

Instantly share code, notes, and snippets.

View ZacAttack's full-sized avatar

Zac Policzer ZacAttack

  • LinkedIn
  • San Francisco
View GitHub Profile
@ZhangHongQuan-Dianrong
ZhangHongQuan-Dianrong / gdbmalloc.py
Created October 30, 2017 11:58
show ptmalloc memory management using gdb+python
# -*- encoding:utf-8 -*-
# malloc.py is an extension for gdb to inspect memory allocation and free
#
import sys
import struct
from contextlib import contextmanager
import os.path
#in pthon 2.6, this is only what I can get
from optparse import OptionParser