From be26c21367b139d087e5e6c4e6db8c84ac97984a Mon Sep 17 00:00:00 2001 From: Rom Walton Date: Tue, 31 Aug 2004 19:15:17 +0000 Subject: [PATCH] *** empty log message *** svn path=/trunk/boinc/; revision=4127 --- checkin_notes | 9 +++++++++ lib/shmem.C | 9 +++------ win_build/installer/BOINC.pfw | 4 ++-- win_build/installer/Media/Default/default.mda | 2 +- 4 files changed, 15 insertions(+), 9 deletions(-) diff --git a/checkin_notes b/checkin_notes index d1baa9dca3..d13291fdfc 100755 --- a/checkin_notes +++ b/checkin_notes @@ -16769,3 +16769,12 @@ Rom 30 Aug 2004 lib/ diagnostics.C + +Rom 31 Aug 2004 + - Win98 has a memory leak condition in dealing with memory mapped files. + So lets go ahead and fix one possible way to slow down the leak, A better + fix is to recycle the shared memory segments. Recycling of the shared + memory segments is forethcomming. + + lib/ + shmem.C diff --git a/lib/shmem.C b/lib/shmem.C index 7f75aef489..7f46dab1bd 100755 --- a/lib/shmem.C +++ b/lib/shmem.C @@ -52,7 +52,6 @@ HANDLE create_shmem(LPCTSTR seg_name, int size, void** pp) { SECURITY_ATTRIBUTES security; HANDLE hSharedMem; - LPVOID pMemPtr; security.nLength = sizeof(security); security.lpSecurityDescriptor = NULL; @@ -63,8 +62,7 @@ HANDLE create_shmem(LPCTSTR seg_name, int size, void** pp) { if (!hSharedMem) return NULL; if (hSharedMem && (ERROR_ALREADY_EXISTS == GetLastError())) return NULL; - pMemPtr = MapViewOfFile( hSharedMem, FILE_MAP_ALL_ACCESS, 0, 0, 0 ); - if (pp) *pp = pMemPtr; + if (pp) *pp = MapViewOfFile( hSharedMem, FILE_MAP_ALL_ACCESS, 0, 0, 0 ); return hSharedMem; } @@ -76,15 +74,14 @@ HANDLE attach_shmem(LPCTSTR seg_name, void** pp) { hSharedMem = OpenFileMapping(FILE_MAP_ALL_ACCESS, FALSE, seg_name); if (!hSharedMem) return NULL; - pMemPtr = MapViewOfFile( hSharedMem, FILE_MAP_ALL_ACCESS, 0, 0, 0 ); - *pp = pMemPtr; + if (pp) *pp = MapViewOfFile( hSharedMem, FILE_MAP_ALL_ACCESS, 0, 0, 0 ); return hSharedMem; } int detach_shmem(HANDLE hSharedMem, void* p) { - UnmapViewOfFile(p); + if (p) UnmapViewOfFile(p); CloseHandle(hSharedMem); return 0; diff --git a/win_build/installer/BOINC.pfw b/win_build/installer/BOINC.pfw index b18f515c2e..4c762537ab 100755 --- a/win_build/installer/BOINC.pfw +++ b/win_build/installer/BOINC.pfw @@ -14,8 +14,8 @@ ApplicationName=BOINC Description=Berkeley Open Infrastructure for Network Computing Comments= Notice=Copyright 2002-2004 University of California, Berkeley -Version=4.05 -OutputSpec=boinc_4.05_windows_intelx86.exe +Version=4.06 +OutputSpec=boinc_4.06_windows_intelx86.exe GUIDs=0 Type=2 Compress=1 diff --git a/win_build/installer/Media/Default/default.mda b/win_build/installer/Media/Default/default.mda index 0d3cc8eb50..e58bbc0bcd 100755 --- a/win_build/installer/Media/Default/default.mda +++ b/win_build/installer/Media/Default/default.mda @@ -34,8 +34,8 @@ WIN32SENABLE=No Language Files\English=No Help Files=No Language Files\Italiano=No -Language Files\Deutsch=No Language Files=No +Language Files\Deutsch=No Program Files=No Screensaver Files=No Language Files\Espanol=No