上一页 1 ··· 4 5 6 7 8 9 10 下一页

2013年9月24日

关于使用了cudaMallocHost之后发生 segment fault的原因

摘要: 由于cudaMallocHost或者其完全版本 cudaHostAlloc,他们都是在host side申请空间,所以所得到的指针都是属于主机端的,但是这个与使用标准库函数malloc/alloc等略有不同,因为使用cuda*申请的空间的指针是由cuda来维护的,一般的,这里发生segment fault,一般都是由于相应指针定义失效,以至于相应的引用指向无效位置,而这种使之失活的操作(在我今天的错误当中)就是 cudaDeviceReset(void);在cudaDeviceReset(void)之后出现的对于之前cudaMallocHost的指针,如果再引用,会导致无效引用,错误产生; 阅读全文

posted @ 2013-09-24 17:00 馒头山小八路 阅读(983) 评论(0) 推荐(0)

2013年8月27日

Inferno OS 资料收集

摘要: 一个被人遗忘的系统:中文wiki: http://zh.wikipedia.org/wiki/Infernoen wiki: http://en.wikipedia.org/wiki/Inferno_%28operating_system%29at google code: http://code.google.com/p/inferno-os/Inferno® is a distributed operating system, originally developed at Bell Labs, but now developed and maintained by Vita N 阅读全文

posted @ 2013-08-27 15:05 馒头山小八路 阅读(288) 评论(0) 推荐(0)

2013年8月13日

关于grub 损坏的问题

摘要: 下午安装系统,发现了libssl.so版本信息与libpython.so的需求不符合的情形,结果就是打开vim等工具都是有两行warnings输出,不爽,试图搞定,未果;然后记得装系统时曾有过错误报出,于是想在win7下重装 Ubuntu 12.04 LTS。但是,系统安装才进入拷贝文件阶段时,我手贱 强行关机,在开机,进入了伟大的 grub rescure模式;瞎了。搞定之: 1, grub rescure$ ls 得到一堆的盘符,如 (hd0) (hd0,msdos1) (hd0,msdos2) ... (hd0, msdos11) 对于各个结果,依次测试: 2, grub rescu.. 阅读全文

posted @ 2013-08-13 19:51 馒头山小八路 阅读(505) 评论(0) 推荐(0)

2013年5月5日

关于 pthread_join的两个小例子

摘要: 简单的例子是最好的学习方式:example 1,从书上摘录的#include<stdio.h>#include<stdlib.h>#include<unistd.h>#include<pthread.h>#include<string.h>void *thr_fn1(void *arg){ printf("thread 1 returning\n"); return((void*)1);}void *thr_fn2(void *arg){ printf("thread 2 exiting\n") 阅读全文

posted @ 2013-05-05 12:09 馒头山小八路 阅读(306) 评论(0) 推荐(0)

pthread 线程冲突一个简单例子

摘要: 从书上看到的,一个很简单的例子,当前显示的不会发生冲突的代码,因为对于参数的传递采用值传递,如果改用指针/引用传递,例如如注释部分所表示的,就会产生冲突啦。。。很可爱的一个例子例子如下:#include <stdio.h>#include <pthread.h>void * print(void *arg){// int id = * (int *)arg; int id = (int )arg; printf("thread %d it's sequn is %d\n", (int)pthread_self(), id); reutrn . 阅读全文

posted @ 2013-05-05 11:40 馒头山小八路 阅读(247) 评论(0) 推荐(0)

2013年5月3日

inline and duplicate definition

摘要: from http://gcc.gnu.org/onlinedocs/gcc-4.3.3/gcc/Inline.html#Inline 1, "When an inline function is not static, then the compiler must assume that there may be calls from other source files; since a global symbol can be defined only once in any program, the function must not be defined in the ot 阅读全文

posted @ 2013-05-03 21:34 馒头山小八路 阅读(485) 评论(0) 推荐(0)

2013年3月30日

libc 一些内置函数

摘要: — Built-in Function: int __builtin_ffs (unsigned int x) Returns one plus the index of the least significant 1-bit of x, or if x is zero, returns zero. — Built-in Function: int __builtin_clz (unsigned int x) Returns the number of leading 0-bits in x, starting at the most significant bit positio... 阅读全文

posted @ 2013-03-30 13:59 馒头山小八路 阅读(436) 评论(0) 推荐(0)

2013年3月26日

关于去除 no version information available && openssl && libpython2.7.so

摘要: 阿,今天虚惊一场:由于之前修改了openssl代码,并编译替换原有的libssl和libcrypto, 每次使用vim等工具时,都有/usr/local/lib/libcrypto.so.1.0.0: no version information available (required by /usr/lib/libpython2.7.so.1.0) 这样的warning信息,很是烦躁,于是今日就动手去干掉这写warnings。不过过程却是惨痛:首先想去更改python,自己却忘记了python对于ubuntu的重要性,动手删除鸟, $sudo apt-get autoremove pytho 阅读全文

posted @ 2013-03-26 21:53 馒头山小八路 阅读(2461) 评论(0) 推荐(0)

2013年3月11日

ZZ 另一篇关于 可变参数的文章

摘要: 原文链接 阅读全文

posted @ 2013-03-11 10:41 馒头山小八路 阅读(73) 评论(0) 推荐(0)

ZZ 关于 可变参数实现原理

摘要: 原文链接 阅读全文

posted @ 2013-03-11 10:40 馒头山小八路 阅读(82) 评论(0) 推荐(0)

上一页 1 ··· 4 5 6 7 8 9 10 下一页

导航