Tekkaman

导航

 
上一页 1 ··· 32 33 34 35 36 37 38 39 40 ··· 42 下一页

2013年3月8日

摘要: 【Mac - i386 Registers】Registers Many instructions accept registers as operands. The OS X assembler for Intel i386 processors always uses names beginning with a percent sign (‘%’) for registers, so naming conflicts with identifiers aren’t possible; further, all register names are in lowercase letter. 阅读全文
posted @ 2013-03-08 11:38 Tekkaman 阅读(359) 评论(0) 推荐(0)
 

2013年3月7日

摘要: 【What is stabs?】 The name stabs comes from symbol ta­ble strings, since the debugging data were originally saved as strings in Unix’s a.out object file’s symbol table. Stabs encodes the information about a program in text strings. Initially quite simple, stabs has evolved over time into a quite 阅读全文
posted @ 2013-03-07 10:50 Tekkaman 阅读(270) 评论(0) 推荐(0)
 

2013年3月6日

摘要: 【OC之class与meta-class】 核心规则:类的实例对象的 isa 指向该类;该类的 isa 指向该类的 metaclass。 通俗说法:成员方法记录在class method-list中,类方法记录在meta-class中。即instance-object的信息在class-object中,而class-object的信息在meta-class中。 图示: class 是 instance object 的类类型。当我们向实例对象发送消息(实例方法)时,我们在该实例对象的 class 结构的 methodlists 中去查找响应的函数,如果没找到匹配的响应函数则在该 c... 阅读全文
posted @ 2013-03-06 19:04 Tekkaman 阅读(5411) 评论(0) 推荐(0)
 
摘要: 【Mac之debuging symbol】 1、Overview Adebugging symbolis a symbol generated by the compiler that allows the debugger to map from addresses in machine code to locations in source code. The standard compilers generate debugging symbols using either the Stabs format or the DWARF format (supported in Xcode. 阅读全文
posted @ 2013-03-06 12:28 Tekkaman 阅读(267) 评论(0) 推荐(0)
 
摘要: 【Executing Mach-O Files】 1、Overview The process of loading and linking a program in OS X mainly involves two entities: the OS X kernel and the dynamic linker. When you execute a program, the kernel creates a process for the program, and loads the program and the dynamic linker shared library, usual. 阅读全文
posted @ 2013-03-06 10:25 Tekkaman 阅读(199) 评论(0) 推荐(0)
 
摘要: 【Mac之Two-Level Namespace】 阅读全文
posted @ 2013-03-06 10:15 Tekkaman 阅读(265) 评论(0) 推荐(0)
 

2013年3月5日

摘要: 【Mac之常用Command】 1、ar - archive utility, be used to operate universery file. 2、otool - be used to analysis objective-c from Mach-O file. 3、libtool - creates either static archive libraries or dynamic shared libraries. You can use thelibtoolcommand to build a static archive library, and you can use t. 阅读全文
posted @ 2013-03-05 23:22 Tekkaman 阅读(324) 评论(0) 推荐(0)
 

2013年3月4日

摘要: 【Mac之Binding Symbols】 1、what is binding? 2、The dynamic linker can bind a program at several stages during loading and execution, depending on the options you specify at build time: attention: just-in-time binding is the default value. 阅读全文
posted @ 2013-03-04 23:52 Tekkaman 阅读(217) 评论(0) 推荐(0)
 
摘要: 【Mac之Linker】 1、static linker static linker is used to compose object file into final file. 2、dynamic linker dynamic linker used to load shared library that the programe based on. 阅读全文
posted @ 2013-03-04 23:42 Tekkaman 阅读(249) 评论(0) 推荐(0)
 
摘要: 【位置无关代码】 1、起因 2、解决 为了避免这种情况,共享库使用了位置无关代码(PIC:Position Independnet Code), 这是无论被加载到内存中的任何位置都可以正常工作的代码。共享库中的代码通常都是位置无关代码,这样代码可以以 RO 方式映射。数据页仍然带有需要被重定位的指针,但由于数 据页将以 COW 方式映射,因此这里对共享不会有什么损失。 阅读全文
posted @ 2013-03-04 17:25 Tekkaman 阅读(3037) 评论(0) 推荐(0)
 
摘要: 【ABI】 总结:简单来说,ABI是规范,所有的Program按这个规范布置自己的二进制数据,以使得可以被操作系统加载。 阅读全文
posted @ 2013-03-04 16:05 Tekkaman 阅读(177) 评论(0) 推荐(0)
 
摘要: 【两遍链接】 1、第一遍 2、第二遍 简而方之,第一步扫描获取各个input file的信息,第二步处理将获取到的信息有组织的输出到一个新的文件中。 阅读全文
posted @ 2013-03-04 13:57 Tekkaman 阅读(141) 评论(0) 推荐(0)
 
摘要: 【链接与加载】 显然,连接与加载的难点在于“重定位”和“符号解析”。 阅读全文
posted @ 2013-03-04 13:23 Tekkaman 阅读(164) 评论(0) 推荐(0)
 

2013年3月3日

摘要: 【MacOSX之详细解说Sections】 1、TEXT 要点:代码存储在__text中,常常字符串(字符常量)存储在__cstring中,const常昊存储在__const中,float、double存储在__litera中 2、DATA 要点:__bss未初始化的表态变量、__common未初始化的全局变量。 阅读全文
posted @ 2013-03-03 22:53 Tekkaman 阅读(186) 评论(0) 推荐(0)
 
摘要: 【Mach-O之Segment初探】 总结:__PAGEZERO用于对齐作用,大小为一页。__TEXT用于存放代码。__DATA用于存放数据。 阅读全文
posted @ 2013-03-03 19:28 Tekkaman 阅读(220) 评论(0) 推荐(0)
 
摘要: 【情绪控制】 生活中总归会存在着很多正面的事实 和负面的事实。 当我们面临困境,如果再把各种负面的事实之间都建立因果关系时 ,往往就容易变得悲观沮丧(比如我单身 +我穷+我丑);反之当身处顺境之时,如果再把对各种正面的事实都建立因果关系 ,往往又容易变得骄傲自大(比如我满分 +我勤奋+我运气)。 所以古往今来,那些智慧的人往往愿意以无常的态度来看待生活的起起落落,他们会看中事实,会就事论事,但不会轻易去建立因果关系,这样也就控制住了自己的情绪,不会大喜大悲 。反之,那些脆弱的人在被情绪左右的时候,甚至还会主动去寻找相应的事实,结果不是进一步作践自己就是死磕别人。 学习ing。 阅读全文
posted @ 2013-03-03 19:19 Tekkaman 阅读(195) 评论(0) 推荐(0)
 
摘要: 【平庸与杰出】 最近看到一个如何判断自己是平庸之列的文章,里面的观点是“假设有一个正常的智商的人,加入了你的公司,他在正常情形下工作3~5年,和你的差距是什么?如果没有什么显著差异,那显然被检测者是平庸的”。从某些角度来看,这个说法是对的。但是什么样的人才是“正常的智商的人”,这是个问题?很多智力正常的人喜欢把喜欢稍低的人当作智力正常的人,以此为沉浸在自我感觉牛X的状态中。 我认为能通过更加客观可测的东西来衡量自己是平庸还是杰出。 1、杰出的人拒绝被人评价。 接受并活在别人评价中的人,注定是个平庸的人。企图讨好大多数人的认可,必然平庸。只有不惧流言,敢想敢做,才有可能做到不平凡的事... 阅读全文
posted @ 2013-03-03 13:22 Tekkaman 阅读(382) 评论(0) 推荐(0)
 
摘要: 【Mach-O Basic Structure】 图表解释: 阅读全文
posted @ 2013-03-03 12:49 Tekkaman 阅读(207) 评论(0) 推荐(0)
 

2013年3月2日

摘要: 【Mac之Launching an Application】 总述:所有进程的启动都是先fork后exec。Launch Service管理着由某类文件该由哪个程序打开。 阅读全文
posted @ 2013-03-02 17:20 Tekkaman 阅读(323) 评论(0) 推荐(0)
 

2013年3月1日

摘要: 【iOS之lipo】 1、lipo是什么 ? 2、lipo使用案例: 1)-info:仅显示出universal file中的包括的架构信息。 2)-detailed_info:打印出fat_header、fat_arch 3)-thin:取出某个架构 4)-create: 创建universal file 更详细资料参考:https://developer.apple.com/library/mac/#documentation/Darwin/Reference/ManPages/man1/lipo.1.html 阅读全文
posted @ 2013-03-01 18:01 Tekkaman 阅读(6085) 评论(0) 推荐(1)
 
摘要: 【iOS之Universal Binaries】 1、什么是Universal Binaries? 2、fat_header 3、fat_arch 注:cputype、cpusubtype在Mach/machine.h文件中可以查看。使用lipo -detailed_info 可以查看fat_header、fat_arch内容。 阅读全文
posted @ 2013-03-01 17:32 Tekkaman 阅读(352) 评论(0) 推荐(0)
 

2013年2月26日

摘要: 【iOS之给图片添加地理位置信息】 阅读全文
posted @ 2013-02-26 15:54 Tekkaman 阅读(872) 评论(0) 推荐(0)
 
摘要: 【Data Management in Quartz 2D】 The preferred way to read and write image data is to use the Image I/O framework. See Image I/O Programming Guide for ... 阅读全文
posted @ 2013-02-26 15:52 Tekkaman 阅读(311) 评论(0) 推荐(0)
 

2013年2月25日

摘要: 【为什么要在预编译头中加__OBJC__?】 因为在一个OC工程中,可能包含.m、.mm、.c、.cpp四类编译文件,这四类文件均会引用.pch预编译头。在编译.c、.cpp时,因为语法不兼容OC,所以预编译头中不能包含objc代码。 But因为.pch是2类源文件共用的,所以在pch中,oc头文件要用__OBJC__包含起来。如下: 阅读全文
posted @ 2013-02-25 13:50 Tekkaman 阅读(2398) 评论(0) 推荐(0)
 

2013年2月24日

摘要: 【call vs apply】 它们的作用都是将函数绑定到另外一个对象上去运行,两者仅在定义参数方式有所区别: apply(thisArg,argArray); call(thisArg[,arg1,arg2…] ]);即所有函数内部的this指针都会被赋值为thisArg,这可实现将函数作为另外一个对象的方法运行的目的apply的说明 如果 argArray 不是一个有效的数组或者不是 arguments 对象,那么将导致一个 TypeError。如果没有提供 argArray 和 thisArg任何一个参数,那么 Global 对象将被用作 thisArg,并且无法被传递任何参数。ca.. 阅读全文
posted @ 2013-02-24 22:33 Tekkaman 阅读(170) 评论(0) 推荐(0)
 
摘要: 【get vs post】 1、get 2、post 3、对比表 阅读全文
posted @ 2013-02-24 16:30 Tekkaman 阅读(183) 评论(0) 推荐(1)
 

2013年2月22日

摘要: 【寄存器】 阅读全文
posted @ 2013-02-22 16:14 Tekkaman 阅读(162) 评论(0) 推荐(0)
 
摘要: 【使用Leaks的一个要点】 Leaks的检测是有延时性的,Leaks每隔一个时间间隔检查一次内存泄露。所以不论在调试或单元测试时,程序跑完后,不能立即结果进程,需要留出一些时间等待Leaks进行检测。 阅读全文
posted @ 2013-02-22 10:08 Tekkaman 阅读(441) 评论(0) 推荐(0)
 
摘要: 【MallocDebugging】 1、libgmalloc中实现了malloc及其它内存相关函数。可用于调试。 2、配置变量 3、Heap Corruption 阅读全文
posted @ 2013-02-22 09:58 Tekkaman 阅读(214) 评论(0) 推荐(0)
 

2013年2月21日

摘要: 【Finding Leaks Using Instruments】 The Instruments application can be used to find leaks in both OS X and iPhone applications. 译:Instrument可以检测OSX和iOS程序的内存泄露。 To find leaks, create a new document template in the application and add the Leaks instrument to it. The Leaks instrument provides leak-det... 阅读全文
posted @ 2013-02-21 18:53 Tekkaman 阅读(235) 评论(0) 推荐(0)
 
摘要: 【C中的各种LOC】 C语言跟内存申请相关的函数主要有 alloca,calloc,malloc,free,realloc,sbrk等.其中alloca是向栈申请内存,因此无需释放. malloc分配的内存是位于堆中的,并且没有 初始化内存的内容,因此基本上malloc之后,调用函数memset来初 阅读全文
posted @ 2013-02-21 14:23 Tekkaman 阅读(227) 评论(0) 推荐(0)
 
摘要: 【iOS登陆的实现】 ASSUMPTION: iOS端加载Web页,然后用户输入用户名密码登陆,WebServer会把用户登陆信息记载在Cookie。那么iOS客户端如何取到Cookie中的登陆信息。 1、客户端监听NSHTTPCookieManagerCookiesChangedNotific... 阅读全文
posted @ 2013-02-21 11:04 Tekkaman 阅读(8618) 评论(0) 推荐(0)
 

2013年2月20日

摘要: 【No-Cache vs No-Store】 cache-control各字符涵意: 阅读全文
posted @ 2013-02-20 18:32 Tekkaman 阅读(647) 评论(0) 推荐(0)
 
摘要: 【HTTP之Proxy】 1、 【vs Gateway】 1、Proxy vs Gateway Strictly speaking, proxies connect two or more applications that speak the same pro- tocol, while gate 阅读全文
posted @ 2013-02-20 16:44 Tekkaman 阅读(275) 评论(0) 推荐(0)
 
摘要: 【Apache的几个特性】 1、Directory Listings 会GET一个目录时,Apache会先找该目录下的DirectoryIndex文件,如果有,则返回该文件内容,否则,返回目录下所有的item。 2、Apache中的CGI Apache中的CGI可以通过指定CGI目录,或指定特写文件扩展名来指定。 3、访问控制。 4、虚拟主机。 阅读全文
posted @ 2013-02-20 13:17 Tekkaman 阅读(467) 评论(0) 推荐(0)
 
摘要: 【WEB服务器的四种类型】 1、Single-threaded WebServer 2、Multiprocess and multithreaded WebServer 3、Multiplexed I/O WebServer 4、Multiplexed multithreaded WebServer 5、图解: 阅读全文
posted @ 2013-02-20 12:56 Tekkaman 阅读(812) 评论(0) 推荐(0)
 

2013年2月19日

摘要: 【HTTP Persistent Connection】 1、HTTP1.0 Persistent Connection实现: 2、HTTP1.0 Persistent Connection图解: 3、HTTP1.0 Persistent Connection参数: 4、HTTP1.1 Persistent Connection A significant difference between HTTP/1.1 and earlier versions of HTTP is that persistent connections are the default beh... 阅读全文
posted @ 2013-02-19 18:28 Tekkaman 阅读(1437) 评论(0) 推荐(0)
 
摘要: http&tcp网络管理真TM难,mark一下,这周内慢慢消化。 详情见《http definitive guide》第4章。【http网络加速】 1、http网络加速有3种方法: 阅读全文
posted @ 2013-02-19 13:12 Tekkaman 阅读(236) 评论(0) 推荐(0)
 
摘要: 【URL语法】 1、URL syntax剖析: 2、参数详解 阅读全文
posted @ 2013-02-19 11:24 Tekkaman 阅读(605) 评论(0) 推荐(0)
 
摘要: 【URI&URL&URN】 1、URI包含URL、URN两个概念, 是这两个概念的总称。 阅读全文
posted @ 2013-02-19 10:59 Tekkaman 阅读(205) 评论(0) 推荐(0)
 
上一页 1 ··· 32 33 34 35 36 37 38 39 40 ··· 42 下一页