![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
C++
文章平均质量分 92
不想做火影的海贼王
这个作者很懒,什么都没留下…
展开
-
ION native 的使用方式
根据 Google 的 GTest 程序 其中的map test ,可以得知正确的 release操作如下TEST_F(Map, MapHandle){ static const size_t allocationSizes[] = {4*1024, 64*1024, 1024*1024, 2*1024*1024}; for (unsigned int heapMask : m_allHeaps) { for (size_t size : allocationSizes原创 2020-09-24 09:21:49 · 206 阅读 · 0 评论 -
linux多线程调用同一个函数解析
原文地址:http://blog.csdn.net/mq_ydn3102/article/details/8546722问题背景:在工作中遇到过一个问题,就是在两个线程同时调用同一个函数的时候,到底是应该在这个函数的内部什么处理上加上互斥。原因又是什么?为了调查这个问题,我决定从以下三方面调查1.线程中函数的调用2.同一个进程中的两个线程调用同一个处理函数3.两个不同进程中的两个线程调用同一个处理...转载 2018-06-28 09:43:30 · 1271 阅读 · 0 评论 -
C++ 重载和继承使用的分析
#include <stdlib.h>#include <stdio.h>#include <iostream>#include <memory>class h2o{public: virtual void hasH2o(void) = 0;};class person{public: person(); virt...原创 2019-07-30 13:43:56 · 111 阅读 · 0 评论 -
C++ 文件操作封装成class
//#include "md5.h"#include <iostream>#include <malloc.h>#include <memory.h>#include <sys/time.h>#include <stdio.h>#include <time.h>#include <cstdlib>#...原创 2019-08-13 18:05:15 · 956 阅读 · 0 评论 -
std::thread 在类内部使用
#include<iostream>#include <thread>#include <unistd.h>#include <functional>class Test{ public: Test(int m):n(m) { testThread_ = std::thread...原创 2019-08-15 10:33:26 · 2069 阅读 · 0 评论 -
C++ thread 封装成 class
#include <pthread.h>#include <unistd.h>#include <stdio.h>#include <stdlib.h>/* public protected private共有继承 public protected 不可见私有继承 private ...原创 2019-08-15 10:34:43 · 560 阅读 · 0 评论 -
C++ 以string形式 打印 十六进制 代码示例
#include <iostream>using namespace std;int main(void){ unsigned char test[10]; test[0] = 0x85; test[1] = 0x3F; test[2] = 0x85; test[3] = 0x34; test[4] = 0x85; tes...原创 2019-08-12 16:57:39 · 6003 阅读 · 0 评论