Tuesday, September 29, 2009
Using umdh to trace down Windows memory leaks
- Install Windbg
- set path="C:\Program Files\Debugging Tools for Windows (x64)";%path%
- enable sysmtem stack trace - gflags -r +ust
- md c:\websymbols
- set symbols path - set _NT_SYMBOL_PATH=SRV*c:\websymbols*http://msdl.microsoft.com/download/symbols;X:\Symbols\exe64ex
- snap process memory - umdh -p:pid -f:output-1-file
- snap process memory again - umdh -p:pid -f:output-2-file
- compare two memory snap - umdh output-1-file output-2-file -f:cmp.txt
- cmp.txt should contain leak information.
Wednesday, September 09, 2009
bazaar and launchpad
Rockstar gave a TOTALLY AWESOME presentation during Ubuntu Developer Week on bzr and lp integration. The takeaway is this:
$ bzr branch lp:mago (downloads >1mb of crap)
You do some config and:
Magical!
~/.bazaar/bazaar.conf:
[ALIASES]
~/.bazaar/locations.conf:
[/home/jtatum/Projects]
$ mkdir ~/Projects/repos/mago
Then, pull down a branch:
$ bzr cbranch lp:~who/mago/whatever
Or make a new one:
$ bzr cbranch mago myawesomecode
Push works magically thanks to the shorthand in location.conf. Neato!
Bazaar can mirror a remote hosted repo into a local centralized branch. It then uses this central branch as the starting point for derived branches, even when hosted remotely. So instead of:
$ bzr branch lp:mago (downloads >1mb of crap)
$ bzr branch lp:~jtatum/mago/gconf (downloads >1mb of crap)
You do some config and:
$ bzr cbranch lp:mago (downloads >1mb of crap)
$ bzr cbranch lp:~jtatum/mago/gconf (downloads ~50kb of crap)
Magical!
~/.bazaar/bazaar.conf:
[ALIASES]
cbranch = cbranch --lightweight
~/.bazaar/locations.conf:
[/home/jtatum/Projects]
cbranch_target = /home/jtatum/Projects/repos
cbranch_target:policy = appendpath
[/home/jtatum/Projects/repos]
push_location = lp:~jtatum
push_location:policy = appendpath
public_branch = lp:~jtatum
public_branch:policy = appendpath
$ mkdir ~/Projects/repos/mago
$ cd ~/Projects/repos/mago
$ bzr init-repo --no-trees .
$ mkdir ~/Projects/mago
$ bzr cbranch lp:mago
Then, pull down a branch:
$ bzr cbranch lp:~who/mago/whatever
Or make a new one:
$ bzr cbranch mago myawesomecode
Push works magically thanks to the shorthand in location.conf. Neato!