摘要:
编写网络包(存储在堆上)转换程序时,在hp-ux机器上运行时会遇到si_code: 1 - BUS_ADRALN - Invalid address alignment. Please refer to the following link that helps in handling unal... 阅读全文
摘要:
项目中用到了java的反射,可以大大减少代码量。但是反射的性能却不容乐观,做了个简单的测试,如下。 public void noreflect() { Person p = new Person(); for(int i=0; i<10000000; ++i){ Person.setName(p, "name"); Person.setAge(p, "22"); } } @Test public void reflect(){ Person p = new Person(... 阅读全文
摘要:
1. 今天在centos6.4系统上编译so,当so引用其他so或者 .a 静态库时, 会出现如下错误(以前未遇到过,与编译器相关,有的编译器编译时会自动将fPIC选项加上):/usr/bin/ld: /home/gavin/local/json/lib/libjson.a(json_object.o): relocation R_X86_64_32S against `.text' can not be used when making a shared object; recompile with -fPIC解决: 重新编译第三方库, 在configure文件中找到相关CPPFLA 阅读全文