From c9e02b73704b3587a2a537cf98f56a534293baac Mon Sep 17 00:00:00 2001 From: Rom Walton Date: Tue, 11 May 2010 20:54:55 +0000 Subject: [PATCH] - client: leave template for causing the debugger to break on a specific memory allocation. client/ main.cpp svn path=/trunk/boinc/; revision=21465 --- checkin_notes | 7 +++++++ client/main.cpp | 12 ++++++++++++ 2 files changed, 19 insertions(+) diff --git a/checkin_notes b/checkin_notes index 1e43852871..8be32b3d11 100644 --- a/checkin_notes +++ b/checkin_notes @@ -3496,3 +3496,10 @@ David 11 May 2010 lib/ coproc.h + +Rom 11 May 2010 + - client: leave template for causing the debugger to break on a + specific memory allocation. + + client/ + main.cpp diff --git a/client/main.cpp b/client/main.cpp index 6297555164..adbfb962d0 100644 --- a/client/main.cpp +++ b/client/main.cpp @@ -242,6 +242,18 @@ static void init_core_client(int argc, char** argv) { diagnostics_init(flags, "stdoutdae", "stderrdae"); +#ifdef _WIN32 + // Specify which allocation will cause a debugger to break. Use a previous + // memory leak detection report which looks like this: + // {650} normal block at 0x000000000070A6F0, 24 bytes long. + // Data: < N P p > 80 1E 4E 00 00 00 00 00 50 AE 70 00 00 00 00 00 + //_CrtSetBreakAlloc(650); + //_CrtSetBreakAlloc(651); + //_CrtSetBreakAlloc(652); + //_CrtSetBreakAlloc(653); + //_CrtSetBreakAlloc(654); +#endif + read_config_file(true); // Set the max file sizes of the logs based on user preferences.