1 2# Dr. Memory 3 4Dr. Memory (www.drmemory.org) is an open-source dynamic memory 5monitoring tool for Windows, Linux, and Mac. 6 7## About Dr. Memory 8 9Dr. Memory operates on unmodified application binaries running on 10Windows, Linux, or Mac on commodity x86 and ARM32 (forthcoming) hardware. 11It is capable of identifying memory-related programming errors including: 12 * accesses of uninitialized memory 13 * accesses to unaddressable memory (heap underflow and overflow) 14 * accesses to freed memory 15 * double frees 16 * memory leaks 17 * handle leaks (on Windows) 18 * GDI API usage errors (on Windows) 19 * accesses to un-reserved thread local storage slots (on Windows) 20 21## Using Dr. Memory (Windows only) 22 23Build your application with debug information and then run it under 24Dr. Memory. Errors found are printed to the screen, and a summary is 25shown at the end of the run. 26 27### Obtain Dr. Memory 28 29The Dr. Memory package is provided as a self-extracting archive 30(DrMemory-Windows-sfx.exe) in tools/drmemory directory, which can be 31extracted by running command 'DrMemory-Windows-sfx.exe -ounpacked -y'. 32 33The Dr. Memory release package can be downloaded from 34https://github.com/DynamoRIO/drmemory/wiki/Downloads. 35 36Nightly builds can be downloaded from 37https://build.chromium.org/p/client.drmemory/builds/. 38 39The Dr. Memory source code can be found at 40https://github.com/DynamoRIO/drmemory. 41 42### Run your application with Dr. Memory 43 44To run your application with Dr. Memory, simply put 'drmemory.exe --' 45before the command that invokes the application. 46 47 * Running pdfium_unittests with Dr. Memory: 48 tools\drmemory\unpaced\bin\drmemory.exe -- out\Debug\pdfium_unittests.exe 49 50 * Running pdfium_tests with Dr. Memory: 51 tools\drmemory\unpaced\bin\drmemory.exe -- out\Debug\pdfium_tests.exe --png YourInputPDF.pdf 52 53### Run test suite with Dr. Memory 54 55A set of scripts are provided to run PDFium test suite with Dr. Memory 56on buildbots, which can also be used for running test suite locally. 57 58 * Running pdfium_unittests with Dr. Memory: 59 tools\drmemory\scripts\pdfium_tests.bat -t pdfium_unittests 60 61 * Running pixel test suite with Dr. Memory: 62 tools\drmemory\scripts\pdfium_tests.bat -t pdfium_pixel 63 64## Documentation 65 66Command 'drmemory.exe -help' prints a list of Dr. Memory runtime 67options with short description. 68 69To view the full documention, point your web browser at 70http://drmemory.org/docs/. 71 72 73## Contact 74 75This project is provided as-is, with no official support. 76Use the Dr. Memory Users group at 77http://groups.google.com/group/drmemory-users/ to ask questions and 78seek help on using Dr. Memory. 79 80Dr. Memory's source code and issue tracker live at 81https://github.com/DynamoRIO/drmemory 82 83If you would like to submit a patch, you will need to first sign a 84Contributor License Agreement. 85See https://github.com/DynamoRIO/drmemory/wiki/Contributing for more 86information. 87