资源简介
翎风原始修正最完整
代码片段和文件信息
/*
Fast Memory Manager: BCB support 1.01
Description:
FastMM support unit for BCB6 1.0. Loads FastMM4 on startup of the Borland C++
Builder application or DLL.
Usage:
1) Under the Project -> Options -> linker menu uncheck “Use Dynamic RTL“
(sorry won‘t work with the RTL DLL).
2) Add FastMM4.pas to your project and build it so that FastMM4.hpp is
created.
3) Add FastMM4BCB.cpp to your project.
FastMM will now install itself on startup and replace the RTL memory manager.
Acknowledgements:
- Jarek Karciarz Vladimir Ulchenko (Vavan) and Bob Gonder for their help in
implementing the BCB support.
Notes:
FastMM cannot uninstall itself under BCB so memory leak checking is not
available. Also since it cannot be uninstalled you should only use it in
dynamically loaded DLLs that will be sharing the main application‘s MM -
otherwise memory will be leaked every time you unload the DLL. Unfortunately
there is nothing I can do about the situation. The __exit procedure in exit.c
calls all finalization routines before it has properly freed all memory. With
live pointers still around FastMM cannot uninstall itself. Not a good
situation and the only solution I see at this stage would be to patch the
RTL.
Change log:
Version 1.00 (15 June 2005):
- Initial release. Due to limitations of BCB it cannot be uninstalled (thus
no leak checking and not useable in DLLs unless the DLL always shares the
main application‘s MM). Thanks to Jarek Karciarz Vladimir Ulchenko and Bob
Gonder for their help.
Version 1.01 (6 August 2005):
- Fixed a regression bug (Thanks to Omar Zelaya).
*/
#pragma hdrstop
#include “FastMM4.hpp“
void BCBInstallFastMM()
{
InitializeMemoryManager();
if (CheckCanInstallMemoryManager())
{
InstallMemoryManager();
}
}
#pragma startup BCBInstallFastMM 0
void BCBUninstallFastMM()
{
//Sadly we cannot uninstall here since there are still live pointers.
}
#pragma exit BCBUninstallFastMM 0
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 86882 2014-10-28 14:44 GameOfMir\Build\Client\Actor.dcu
文件 67850 2014-10-28 14:44 GameOfMir\Build\Client\AxeMon.dcu
文件 6641 2014-10-28 14:44 GameOfMir\Build\Client\clEvent.dcu
文件 16641 2014-10-28 14:27 GameOfMir\Build\Client\ClFunc.dcu
文件 31366 2014-10-28 14:31 GameOfMir\Build\Client\cliUtil.dcu
文件 197159 2014-10-28 14:46 GameOfMir\Build\Client\ClMain.dcu
文件 76486 2014-10-28 14:25 GameOfMir\Build\Client\DIB.dcu
文件 455550 2014-10-28 14:24 GameOfMir\Build\Client\DirectX.dcu
文件 14597 2014-10-28 14:44 GameOfMir\Build\Client\DlgConfig.dcu
文件 17136 2014-10-28 14:44 GameOfMir\Build\Client\DrawScrn.dcu
文件 193131 2014-10-28 14:26 GameOfMir\Build\Client\DShow.dcu
文件 36179 2014-10-28 14:31 GameOfMir\Build\Client\DWinCtl.dcu
文件 23681 2014-10-28 14:24 GameOfMir\Build\Client\DXClass.dcu
文件 5981 2014-10-28 14:24 GameOfMir\Build\Client\DXConsts.dcu
文件 203000 2014-10-28 14:26 GameOfMir\Build\Client\DXDraws.dcu
文件 116324 2014-10-28 14:26 GameOfMir\Build\Client\DXRender.dcu
文件 74348 2014-10-28 14:26 GameOfMir\Build\Client\DXSounds.dcu
文件 30794 2014-10-28 14:25 GameOfMir\Build\Client\DXTexImg.dcu
文件 4669 2014-10-28 14:13 GameOfMir\Build\Client\EDcode.dcu
文件 204733 2014-10-28 14:44 GameOfMir\Build\Client\FState.dcu
文件 76720 2014-10-28 14:13 GameOfMir\Build\Client\Grobal2.dcu
文件 20711 2014-10-28 14:13 GameOfMir\Build\Client\GShare.dcu
文件 21220 2014-10-28 14:44 GameOfMir\Build\Client\HerbActor.dcu
文件 41931 2014-10-28 14:13 GameOfMir\Build\Client\HUtil32.dcu
文件 50348 2014-10-28 14:44 GameOfMir\Build\Client\IntroScn.dcu
文件 58326 2014-10-28 14:09 GameOfMir\Build\Client\JSocket.dcu
文件 35055 2014-10-28 14:44 GameOfMir\Build\Client\magiceff.dcu
文件 13668 2014-10-28 14:31 GameOfMir\Build\Client\MapUnit.dcu
文件 3557 2014-10-28 14:13 GameOfMir\Build\Client\Mpeg.dcu
文件 38126 2014-10-28 14:31 GameOfMir\Build\Client\MShare.dcu
............此处省略1208个文件信息
评论
共有 条评论