linux内核中内存相关的操作函数1、kmalloc()/kfree()static __always_inline void *kmalloc(size_t size, gfp_t flags)内核空间申请指定大小的内存区域,返回内核空间虚拟地址。在函数实现中,如果申请的内存空间较大的话,会从bu...
分类:
系统相关 时间:
2014-12-08 21:08:09
阅读次数:
340
本阶段完成把ffplay移植到sdl2, PC上基本测试:图片,视频OK。
api 1.2
SDL_Surface *screen;
screen = SDL_SetVideoMode(w, h, 0, flags);
SDL_WM_SetCaption
SDL_FillRect
screen->format, w, h
SDL_UpdateRect
SDL_Ove...
分类:
其他好文 时间:
2014-12-08 00:56:16
阅读次数:
1525
在Android项目中用到JNI,当用了proguard后,发现native方法找不到很多变量,原来是被produard优化掉了。所以,在JNI应用中该慎用progurad啊。解决办法:1、在Android.mk中加入一行:LOCAL_PROGUARD_FLAGS := -include $(LOC...
分类:
移动开发 时间:
2014-12-06 12:44:11
阅读次数:
216
ttp://www.beej.us/guide/bgnet/output/html/multipage/sendman.html
send()用于TCP SOCK_STREAM,sendto()用于UDP SOCK_DGRAM, send支持flags:
MSG_OOB:send as "Out of Band" data.该数据包优先,可以先接受到,对端会收到SIGURG信号
MS...
分类:
其他好文 时间:
2014-12-06 10:11:33
阅读次数:
264
包尾加\n编程实践SYNOPSIS
#include
#include
ssize_t recv(int sockfd, void *buf, size_t len, int flags);与read相比,只能用于套接字文件描述符,而且多了一个flagsFlags常用取值:MSG_OOB(紧急指针,带外数据) This flag requests r...
分类:
其他好文 时间:
2014-12-05 12:46:02
阅读次数:
276
1.imread函数首先,我们看imread函数,可以在OpenCV官方文档中查到其原型如下:Mat imread(const string& filename, int flags=1 );其中,第一个参数,const string&类型的filename,填我们需要载入的图片路径名。在Windo...
分类:
Windows程序 时间:
2014-12-04 11:56:06
阅读次数:
1066
新建工程后,几项准备:1、工程中一个文件设为.mm后缀2、在Xcode的Project -> Edit Active Target -> Build -> Linking -> Other Linker Flags中添加-ObjC3、设置静态库的链接路径,在Xcode的Project -> Edit...
分类:
移动开发 时间:
2014-12-03 18:56:59
阅读次数:
266
使用语句 [java] view plaincopyprint?PendingIntent intent= PendingIntent.getBroadcast(Context context, int requestCode, Intent intent, int flags) PendingIntent intent= PendingIntent.getBroadcast(Con...
分类:
移动开发 时间:
2014-12-02 16:44:37
阅读次数:
152
open函数用于打开和创建一个文件。所需头文件: #include #include #include 常用函数原型: int open(const char *pathname, int flags)或者 int open(const char *pathnam...
分类:
系统相关 时间:
2014-11-27 23:32:53
阅读次数:
258
在我们编译Android系统的user版本的时候,有时候会出现proguard的错误,在解决这个错误之着,我们需要了解一些知识:
1,proguard是用来干什么的?
简单点说,他就是用来做JAVA代码混淆的一个工具。
2,这个东西在哪里实现的?
我们一般会在Android.mk文件中对其进行支持,比如:
1)指定不需要混淆的native方法和变量的pro...
分类:
移动开发 时间:
2014-11-27 12:51:46
阅读次数:
143