资源简介
DELPHI版IOCP完整源码及实例,源码均有详细的中文说明。
代码片段和文件信息
/*
Fast Memory Manager: BCB support 2.0
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 initial BCB support.
- JiYuan Xie for doing an entire rewrite of this unit to allow leak reporting
etc. under BCB.
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).
Version 2.00 (22 April 2008):
- Rewritten by JiYuan Xie to implement leak reporting etc. (Thank you!)
*/
//#ifndef _NO_VCL
#pragma hdrstop
#include “FastMM4Messages.hpp“
#include “FastMM4.hpp“
#pragma option push
#pragma option -k- -d -vi- -O2 -b- -3 -a8 -pc -RT- -x -xd -r -AT -vG- -vG0- -vG1- -vG2- -vG3- -vGc- -vGt- -vGd-
#ifdef __cplusplus
extern “C“ {
#endif
#ifdef PatchBCBTerminate
#ifdef FullDebugMode
#ifndef LoadDebugDLLDynamically
#pragma link “FastMM_FullDebugMode.lib“
#if defined(RawStackTraces)
__declspec(dllimport) void __fastcall GetRawStackTrace(unsigned * AReturnAddresses
unsigned AMaxDepth unsigned ASkipframes);
#else
__declspec(dllimport) void __fastcall GetframebasedStackTrace(unsigned * AReturnAddresses
unsigned AMaxDepth unsigned ASkipframes);
#endif
__declspec(dllimport) void __fastcall LogStackTrace(unsigned * AReturnAddresses
unsigned AMaxDepth char *ABuffer);
#endif
#endif
#pragma pack(push1)
typedef struct {
unsigned char JmpInst; //E9
int Offset;
} TRelativeJmp32 * PRelativeJmp32;
typedef struct {
unsigned short JmpInst; //FF 25
void * * DestPtr;
} TIndirectJmp32 * PIndirectJmp32;
#pragma pack(pop)
//Return true if write OK
bool __fastcall WriteMem(void * Location void * Data unsigned int DataSize)
{
unsigned long OldProtect;
if (VirtualProtect(Location DataSize PAGE_EXECUTE_READWRITE &OldProtect))
{
memmove(Location Data DataSize);
FlushInstructionCache(GetCurrentProcess() Location sizeof(DataSize));
VirtualProtect(Location DataSize OldProtect &OldProtect);
return true;
}
else {
return false;
}
}
#define RelativeJmp32Inst (0xE9)
//Return true if patch OK
bool __fastcall PatchProc(void * OldProc void * NewProc TRelativeJmp32 * Backu
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2018-07-03 15:29 Delphi_IOCP_Source\
目录 0 2018-07-03 15:29 Delphi_IOCP_Source\FastMM492\
目录 0 2018-07-03 15:29 Delphi_IOCP_Source\FastMM492\CPP Builder Support\
文件 45724 2010-11-29 15:34 Delphi_IOCP_Source\FastMM492\CPP Builder Support\FastMM4BCB.cpp
目录 0 2018-07-03 15:29 Delphi_IOCP_Source\FastMM492\Demos\
目录 0 2018-07-03 15:29 Delphi_IOCP_Source\FastMM492\Demos\Dynamically Loaded DLL\
文件 1213 2010-11-29 15:34 Delphi_IOCP_Source\FastMM492\Demos\Dynamically Loaded DLL\ApplicationForm.dfm
文件 1045 2010-11-29 15:34 Delphi_IOCP_Source\FastMM492\Demos\Dynamically Loaded DLL\ApplicationForm.pas
文件 1279 2010-11-29 15:34 Delphi_IOCP_Source\FastMM492\Demos\Dynamically Loaded DLL\DLLForm.dfm
文件 651 2010-11-29 15:34 Delphi_IOCP_Source\FastMM492\Demos\Dynamically Loaded DLL\DLLForm.pas
文件 1678 2010-11-29 15:34 Delphi_IOCP_Source\FastMM492\Demos\Dynamically Loaded DLL\DynamicallyLoadedDLLDemo.groupproj
文件 515 2010-11-29 15:34 Delphi_IOCP_Source\FastMM492\Demos\Dynamically Loaded DLL\TestApplication.cfg
文件 236 2010-11-29 15:34 Delphi_IOCP_Source\FastMM492\Demos\Dynamically Loaded DLL\TestApplication.dpr
文件 3387 2010-11-29 15:34 Delphi_IOCP_Source\FastMM492\Demos\Dynamically Loaded DLL\TestApplication.dproj
文件 4396 2010-11-29 15:34 Delphi_IOCP_Source\FastMM492\Demos\Dynamically Loaded DLL\TestApplication.res
文件 536 2010-11-29 15:34 Delphi_IOCP_Source\FastMM492\Demos\Dynamically Loaded DLL\TestDLL.cfg
文件 308 2010-11-29 15:34 Delphi_IOCP_Source\FastMM492\Demos\Dynamically Loaded DLL\TestDLL.dpr
文件 3389 2010-11-29 15:34 Delphi_IOCP_Source\FastMM492\Demos\Dynamically Loaded DLL\TestDLL.dproj
文件 4396 2010-11-29 15:34 Delphi_IOCP_Source\FastMM492\Demos\Dynamically Loaded DLL\TestDLL.res
目录 0 2018-07-03 15:29 Delphi_IOCP_Source\FastMM492\Demos\Replacement borlndmm DLL\
文件 42496 2010-11-29 15:34 Delphi_IOCP_Source\FastMM492\Demos\Replacement borlndmm DLL\BorlndMM.dll
文件 1012 2010-11-29 15:34 Delphi_IOCP_Source\FastMM492\Demos\Replacement borlndmm DLL\DemoForm.dfm
文件 1614 2010-11-29 15:34 Delphi_IOCP_Source\FastMM492\Demos\Replacement borlndmm DLL\DemoForm.pas
文件 183296 2010-11-29 15:34 Delphi_IOCP_Source\FastMM492\Demos\Replacement borlndmm DLL\FastMM_FullDebugMode.dll
文件 509 2010-11-29 15:34 Delphi_IOCP_Source\FastMM492\Demos\Replacement borlndmm DLL\FullDebugModeDemo.cfg
文件 298 2010-11-29 15:34 Delphi_IOCP_Source\FastMM492\Demos\Replacement borlndmm DLL\FullDebugModeDemo.dpr
文件 4396 2010-11-29 15:34 Delphi_IOCP_Source\FastMM492\Demos\Replacement borlndmm DLL\FullDebugModeDemo.res
目录 0 2018-07-03 15:29 Delphi_IOCP_Source\FastMM492\Demos\Usage Tracker\
文件 626 2010-11-29 15:34 Delphi_IOCP_Source\FastMM492\Demos\Usage Tracker\DemoForm.dfm
文件 518 2010-11-29 15:34 Delphi_IOCP_Source\FastMM492\Demos\Usage Tracker\DemoForm.pas
文件 7610 2010-11-29 15:34 Delphi_IOCP_Source\FastMM492\Demos\Usage Tracker\FastMMUsageTracker.dfm
............此处省略263个文件信息
- 上一篇:摄像头sensor-IMX225规格书
- 下一篇:设计模式(最新高清PDF版)
相关资源
- IOCP服务器
- iocp_file文件传输
- iocp服务器代码_tct&udp;测试工具
- IOCP学习客户端代码
- 功能强大的IOCP Socket Servre模块例程源
- openssl 结合 IOCP的
- IOCPExample_By_PiggyXP 完成端口
- IOCP 客户端和服务端
- 实现了IOCP完成端口模型的服务器设计
- IOCP_API(2.4)
- IOCP_API最新版(2008/11/15)
- 可以承载20k并发量的IOCP
- 博客文章《完成端口详解》配套代码
- IOCP服务器、客户端终极网络聊天室代
- 公认不错的IOCP封装类
- 基于IOCP的文件传输
- IOCP作为服务器实现P2P_UDP通信
- 使用完成端口实现IOCP服务器端框架,
- IOCP游戏服务器(含压力测试)
- 经过封装的IOCP完成端口模型客户端
- 高性能的socket通讯服务器完成端口模
- dzdiocp(地质灾害的iocp控件)
- e语言-TCP服务器完整源码(基于IOCP实
- 易语言Iocp测试源码
- 高效率IOCP的UDP通信服务端
- 真正无锁IOCP回射服务器IOCP Tcp EchoSe
- 完整的IOCP
- 强大的TcpServer压力测试工具源码附突
评论
共有 条评论