struct cdev *cdev_alloc(void) { struct cdev *p = kzalloc(sizeof(struct cdev), GFP_KERNEL); if (p) { INIT_LIST_HEAD(&p->list); kobject_init(&p->kobj, & ...
分类:
其他好文 时间:
2020-05-05 01:03:40
阅读次数:
92
前言: 本文总结概括SGI STL源码中二级配置器的工作方式,主要是学习内存池+16条链表的内存分配方式。 无论一级配置器还是二级配置器,统一的接口如下: //其中Alloc可能是一级配置器,也有可能是二级配置器; //这个类的作用其实就是单纯地转给一级或者二级配置器调用; template<cla ...
分类:
其他好文 时间:
2020-05-03 20:41:16
阅读次数:
56
1. 代码实现 1 UIBlurEffect *blur = [UIBlurEffect effectWithStyle:UIBlurEffectStyleLight]; 2 UIVisualEffectView *effectview = [[UIVisualEffectView alloc] i ...
分类:
移动开发 时间:
2020-04-30 17:21:45
阅读次数:
826
更新记录 时间 | 版本修改 | | | 2020年4月23日| 初版 | 前言 本人在阅读《Objective C 高级编程》 1.2.3节 alloc/retain/release/dealloc实现这个章节时,有一个细节一只没搞懂 这个问题阻塞了我的阅读进度,直至后续和一位好友交流时才彻底搞懂 ...
分类:
其他好文 时间:
2020-04-24 01:49:09
阅读次数:
81
//第一步:注册组件->编码器、解码器等等… av_register_all(); //第二步:初始化封装格式上下文->视频编码->处理为视频压缩数据格式 AVFormatContext *avformat_context = avformat_alloc_context(); //注意事项:FFm ...
分类:
其他好文 时间:
2020-04-22 14:57:47
阅读次数:
123
<?php $cmd = "id"; $n_alloc = 10; # increase this value if you get segfaults class MySplFixedArray extends SplFixedArray { public static $leak; } clas ...
分类:
Web程序 时间:
2020-04-01 19:49:22
阅读次数:
189
vector 线性的动态分配存储空间。定义如下 template <class T, class Alloc = alloc> class vector { public: // 类型相关定义 typedef T value_type; typedef value_type* pointer; ty ...
分类:
其他好文 时间:
2020-03-27 16:51:10
阅读次数:
70
回顾一下之前的字符设备驱动编程: 1,实现入口函数 xxx_init()和卸载函数 xxx_exit() 2,申请设备号 register_chrdev_region (与内核相关) 3,注册字符设备驱动 cdev_alloc、cdev_init、 cdev_add (与内核相关) 4,利用udev ...
分类:
其他好文 时间:
2020-03-05 01:22:00
阅读次数:
83
参考博客:https://blog.csdn.net/qq_41015048/article/details/102558047 std::wstring_convert template < class Codecvt, class Elem = wchar_t, class Wide_alloc ...
分类:
编程语言 时间:
2020-02-12 18:22:11
阅读次数:
99
一些语法更改对象的类/获取对象的类1234CustomClass *class1 = [[CustomClass alloc]init];Class aclass =object_setClass(class1, [TestClass class]);NSLog(@"aclass--%@",NSSt... ...
分类:
其他好文 时间:
2020-02-02 10:25:28
阅读次数:
69