???????? ??? PHD ???? ???? ???????

?????? ????????? ?????? ?????????
???? ???????: 194655 - ??? ???????? ???? ????? ????? ??? ???????.
??? ????? ??? ???????. ????? "??? ??" ??? ??? ??????? ??? ????.
????? ???? | ?? ????

?? ??? ??????

??????

???? ??????? ????? ?? ?????? ?? ?????????. ?? ????? ?????? ?????? ???? ??????? ?? ??????? ??? PHD Visual C++ ???????? ?? ??? ???????. ?? ???? ????? ???????? ??????? ?? ????? ??? PHD ???????? ? ????? ?????? ??? ???? ???? ??? ?? ??? ???? ???? ???????.

PHD.EXE ????????? ?????? ??????? ???? ???? ???? ????? ??????? PHD ????? ????? ?????/disprove ???? ???????. ????? ??? PHD ????? ???? ??? "????? ????? ??????" ?? ?????? ????? ??????? ?? Windows NT. ???? ??? ???????? ???????? ??? Windows NT ???.

??????? ????

??????? ??????? ??? ?????? ??????? ?? "???? ??????? ?? Microsoft":
Phd.exe
????? ???????: ?????? - 23-1998

?????? ??? ??????? ?????? ??? ????? ????? ????? ??? Microsoft "? ???? ??? ??? ??????? ?????? ?????? ??" ????? ??????? ?? Microsoft:
119591????? ?????? ??? ????? ??? Microsoft ?? ??????? ??? ????????
???? Microsoft ???? ??? ????? ????? ?? ?????????. ??????? Microsoft ???? ?? ?????? ??? ??????? ??????? ??? ??????? ???? ?? ??? ?????. ??? ????? ????? ??? ?????? ????? ?????? ???? ????? ??? ??? ????? ??? ??????? ??? ???? ??? ??? ?????.
??? ????? ??????? ??????? ?????? ?? ???????:
    FileName                Description
    ---------------------------------------------------------
   PDH.dll                  Contains helper functions used by PHD.
   RKLeak.cpp               Contains the code for the PHD class.
   RKLeak.h                 Header file for the PHD class.
   TestMain.cpp             A simple program to demonstrate the PHD class.
				

???????? ??? PHD ?????? ????? RKLeak.cpp ?? ???????. ??? ?? ??? ??? ????? ??? ???? ??? ??? ????? PDH.lib ???? ???? ?? 6.0 C++ ?????. ????? ????? ??? ????? ????? PHD.dll ??? ???? ????? ?? ???? ???? ??????? ?? ?????? ????.

????? ??? TestMain.cpp ??? ????? ????????? ???????? ?????? ???? ???? ????? ??????? ??? PHD:

??? ?????

   **************************************************
   #include "rkLeak.h"

   void main()
   {

      char *myCntrs[]={
         "\\Memory\\Available bytes",
         "\\Memory\\committed bytes",
         "\\Memory\\pool Paged bytes",
         "\\Memory\\pool Nonpaged bytes",
      };

      PHD mphd2(myCntrs,sizeof(myCntrs)/sizeof(myCntrs[0]));
      PHD mphd;

      const int arSize=4096;
      for (int i=0;i<5;i++){
         double *d = new double[arSize];
         d[0]= 1.;      d[arSize-1] = 2.;  // Force to committed mem.
         mphd.logData(i);
         mphd2.logData(i);
      }

   ***************************************************
				

??? ??????? ???? PHD ???? ?? ????? ??????? ???? ???? ????????. ??? ?? ??? ??????? ???????? ?? ??????? Perfmon.exe.

??????? ?????? ????? PHD (???? ?????) ?????? ????? ?????????? ??????? ??? ??????: ????? ?????? ?????? "?" ????? ???? ??? ???? "?" ???? ??????? ?????? ??? ????? ???? ??? ???? ??? ????? ???? ? ?????? ?????.

??? ????? ?????? ?? ????? ???????? ???????? ??????? ???? API leaking ??????? ?? ???? ??? PHD ??? ???????? ????? PHD::logData ???? ????. ????? ?????? ??? ??? ???? "< name>_perf.log EXE" ?? ?????? ??????. ??? ????? ??? ????? ?????? ????? ??? ??????? ?????? ? ?? ????? ??? ??????? ???? ??????? ?? API ???? ??? ???? ????? ?? ???????. ??? ?? ??????? API ???? ??? ???? (??? ???? ??????? ?????? ???? ??? ???? ????? ??????? ??????? ?????? ??????? ??????) ? ????? ??????? ??? ???? ???????, ?? API ????. ?????? ????? ??????? ????? ????? ???????? ???? exercises API ?? ??????.

????? ?????????? 5.x C++ ??????? ??? ??????? ?????? ?????? ??????? ?? RKLeak.h:
   #undef PdhOpenQuery      //          PdhOpenQueryA
   extern "C" long __stdcall
   PdhOpenQuery (
       IN      LPCSTR      szDataSource,
       IN      DWORD       dwUserData,
       IN      HQUERY      *phQuery
   );
				

????? ????

????? ????? ??? ????? ?? ????? ??????? ????????? ?????? ??? ??????? ??? ?????? ???? ?????? ???????? ???? ???? ?? ?????? ?? ?????? ??? ???? ???????. ??? ???? ??????? ???? ??????? ????????? ??????? ?????? ?????? ?? ????????:
http://docs.linux.cz/programming/c/www.eskimo.com/~scs/C-faq/q18.2.html
?????? ??? ????? ?????? ?????? ?????? ???? ??? ???????? ??? ??? ?????? ??????? ?? Microsoft; ???? ?? ???? ? ?????? ?? ??????? ????? ???? ??? ???????? ?? ???????. ??? ????? ?????? ?? ?? ??? ??????? ?? ???? ??? ???????? ?????? ????? ?? ???? ?????? ?? ???? ????? ????? ????.

??? ????? Visual C++ ???? ??????? ??????? ??????? API ???? ????? ?????? ???? ??????. ????? ??????? _CrtMemDifference() ? _CrtMemDumpAllObjectsSince() ? ????? ?? ??????? ?? ???? "????????? C++ ?????" ?? ?????? Debug ???? ????. ??? ??????? ??? ????? ?? ???? ?? ????????? ???????? "?" ?? ???? ?? ?????? ????.

(?) 1998 ???? Microsoft ? ???? ???? ?????. ????????? ??? ???? Anderson ? Microsoft Corporation.

???????

???? ???????: 194655 - ????? ??? ??????: 24/???? ??????/1435 - ??????: 2.5
????? ???
  • Microsoft Visual Studio 6.0 Enterprise Edition
  • Microsoft Visual Studio 97 Service Pack 3
  • Microsoft Visual C++ 5.0 Professional Edition
  • Microsoft Visual C++ 6.0 Professional Edition
  • Microsoft Visual Basic 5.0 Enterprise Edition
  • Microsoft Visual Basic Enterprise Edition for Windows 6.0
????? ??????: 
kbnosurvey kbarchive kbmt kbdownload kbfile kbinfo kbsample KB194655 KbMtar
????? ????
???: ??? ????? ??? ?????? ???????? ?????? ????? ???? ????? ?????????? ????? ?? ????????? ?????? ????. ???? ???? ?????????? ???? ?? ???????? ???????? ?????? ????????? ????? ????????? ???????? ????? ???????? ?????? ?? ?????? ??? ?? ???????? ???????? ?? ????? ??????? ?????? ??? ??????? ?????? ??. ?????? ?? ???? ??? ??????? ???????? ????? ?? ???? ????? ?????? ??? ????? ??? ????? ??????? ?? ????? ?? ?????? ??? ??? ??????? ??????? ?? ????? ????? ????? ????? ?????. ?? ????? ???? ?????????? ??????? ??? ????? ?? ??????? ?? ????? ?????? ?? ??? ????? ?? ????? ??????? ?? ???????? ?? ??? ???????. ???? ???? ?????????? ???????? ??? ????? ?????? ??????? ??????
???? ??? ????? ??????? ?????? ??????????194655

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com