首页
社区
课程
招聘
[旧帖] [求助] GH0ST 的 根据CPU 改变线程数量的问题 0.00雪花
发表于: 2012-8-16 13:18 1656

[旧帖] [求助] GH0ST 的 根据CPU 改变线程数量的问题 0.00雪花

2012-8-16 13:18
1656
for (BOOL bStayInPool = TRUE; bStayInPool && pThis->m_bTimeToKill == false; )
        {

        /************************************************************************/
                if (!bError)
                {
                        
                        // Allocate another thread to the thread Pool?
                        if (nBusyThreads == pThis->m_nCurrentThreads)  
                        {
                                if (nBusyThreads < pThis->m_nThreadPoolMax)
                                {
                                        if (pThis->m_cpu.GetUsage() > pThis->m_nCPUHiThreshold)
                                        {
                                                UINT nThreadID = -1;

//                                                HANDLE hThread = (HANDLE)_beginthreadex(NULL,                                // Security
//                                                                                         0,                                        // Stack size - use default
//                                                                                         ThreadPoolFunc,  // Thread fn entry point
///                                                                                         (void*) pThis,            
//                                                                                         0,                                        // Init flag
//                                                                                         &nThreadID);        // Thread address

//                                                CloseHandle(hThread);
                                        }
                                }
                        }

        // Thread timed out - IDLE?
                        if (!bIORet && dwIOError == WAIT_TIMEOUT)
                        {
                                if (lpClientContext == NULL)
                                {
                                        if (pThis->m_cpu.GetUsage() < pThis->m_nCPULoThreshold)
                                        {
                                                // Thread has no outstanding IO - Server hasn't much to do so die
                                                if (pThis->m_nCurrentThreads > pThis->m_nThreadPoolMin)
                                                        bStayInPool =  FALSE;
                                        }

                                        bError = true;
                                }
                        }
                }

         }

这一段 根据CPU 使用率 改变线程的 代码 是不是没用啊。。首先 创建线程给注释掉了。。没法 增加线程
而且 bStayInPool  为 false 也不能 移去线程啊。。他的判断是两个条件。

最近刚研究 GH0ST。。希望高手给 讲解下。
谢谢

[课程]FART 脱壳王!加量不加价!FART作者讲授!

收藏
免费 0
支持
分享
最新回复 (1)
雪    币: 205
活跃值: (10)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
2
请进群10025380,gh0st群
2012-12-10 17:03
0
游客
登录 | 注册 方可回帖
返回
//