上一页 1 2 3 4 5 6 ··· 15 下一页

2015年3月25日

对象池 定长内存池

摘要: ~对象池#ifndef __object_pool__ #define __object_pool__#pragma once #include "mutex_lock.h"#define STRUCT_FIELD(address, type, field) ((type *)((char*)(ad... 阅读全文

posted @ 2015-03-25 00:26 kangbry 阅读(563) 评论(0) 推荐(0) 编辑

环形buff

摘要: ~ 阅读全文

posted @ 2015-03-25 00:24 kangbry 阅读(297) 评论(0) 推荐(0) 编辑

2015年3月23日

reactor模式

摘要: ~ 阅读全文

posted @ 2015-03-23 10:11 kangbry 阅读(89) 评论(0) 推荐(0) 编辑

2015年3月18日

fork函数

摘要: #include #include int main () { pid_t fpid; //fpid表示fork函数返回的值 int count=0; fpid=fork(); if (fpid < 0) printf("error in fork!"); else if (fpid =... 阅读全文

posted @ 2015-03-18 23:37 kangbry 阅读(129) 评论(0) 推荐(0) 编辑

7层网络模型

摘要: OSI是一个开放性的通行系统互连参考模型,他是一个定义的非常好的协议规范。OSI模型有7层结构,每层都可以有几个子层。 OSI的7层从上到下分别是 7 应用层 6 表示层 5 会话层 4 传输层 3 网络层 2 数据链路层 1 物理层 其中高层,即7、6、5、4层定义了应用程序的功能,下面3层,即3... 阅读全文

posted @ 2015-03-18 23:30 kangbry 阅读(234) 评论(0) 推荐(0) 编辑

扑克存储

摘要: _uint8 g_card[MAX_CARD+1] = { 0x30, 0x40, 0x50, 0x60, 0x70, 0x80, 0x90, 0xa0, 0xb0, 0xc0, 0xd0, 0xe0, 0xf0, //方片 3-20x31, 0x41, 0x51, 0x61, 0x71, 0x8... 阅读全文

posted @ 2015-03-18 17:22 kangbry 阅读(149) 评论(0) 推荐(0) 编辑

2015年3月11日

电梯算法

摘要: #include #define N 6int nPerson[6] = {1,2,3,4,5,6};void min_floor(int& floor, int& min){ for (int i = 0; i j ? i - j : j - i); } if ... 阅读全文

posted @ 2015-03-11 22:49 kangbry 阅读(714) 评论(0) 推荐(0) 编辑

2014年12月11日

mysql动态表名

摘要: DELIMITER $$USE `yunva-storage`$$DROP PROCEDURE IF EXISTS `sp_add_push_msg`$$CREATE DEFINER=`root`@`%` PROCEDURE `sp_add_push_msg`( IN i_userid BI... 阅读全文

posted @ 2014-12-11 15:53 kangbry 阅读(2121) 评论(0) 推荐(0) 编辑

线程变量

摘要: pthread_getpecific和pthread_setspecific实现同一个线程中不同函数间共享数据的一种很好的方式。#include#include#includepthread_key_t p_key;void func1(){ int *tmp = (int*)pthread_ge... 阅读全文

posted @ 2014-12-11 09:28 kangbry 阅读(215) 评论(0) 推荐(1) 编辑

2014年12月8日

ptrace学习

摘要: x64 ptrace使用#include #include #include #include #include #include #include #include int main(){ pid_t child; long orig_eax; child = fork(); ... 阅读全文

posted @ 2014-12-08 13:16 kangbry 阅读(210) 评论(0) 推荐(0) 编辑

上一页 1 2 3 4 5 6 ··· 15 下一页

导航