上一页 1 ··· 79 80 81 82 83 84 85 86 87 ··· 102 下一页
摘要: 面向过程与面向对象的本质区别 一位计算机界的大师曾说过,“我认为,面向对象的目标从来都不是复用和扩展,而是提供一种处理复杂问题的方法”。 面向过程讲究自顶向下逐步求精。找到一个系统的入口然后顺藤摸瓜,分析出每一步以及影响这一步的其他因素,我们就能够定义这个系统。 面向对象认为世界是有很多对象组成的, 阅读全文
posted @ 2017-12-11 23:55 zzfx 阅读(416) 评论(0) 推荐(0)
摘要: 1)取消点的位置;耗时操作、大的业务逻辑; 2)取消后的资源释放。 pthread_cleanup_push 执行取消操作存在一定的危险。大多数危险都与完全恢复不变量和释放共享资源有关。取消线程时一定要格外小心,否则可能会使互斥保留为锁定状态,从而导致死锁状态。或者,已取消的线程可能保留已分配的内存 阅读全文
posted @ 2017-12-11 19:36 zzfx 阅读(406) 评论(0) 推荐(0)
摘要: Concurrency and Application Design In the early days of computing, the maximum amount of work per unit of time that a computer could perform was deter 阅读全文
posted @ 2017-12-11 19:21 zzfx 阅读(155) 评论(0) 推荐(0)
摘要: One of the technologies for starting tasks asynchronously is Grand Central Dispatch (GCD). This technology takes the thread management code you would 阅读全文
posted @ 2017-12-11 19:19 zzfx 阅读(182) 评论(0) 推荐(0)
摘要: Replacing Threads with Dispatch Queues To understand how you might replace threads with dispatch queues, first consider some of the ways you might be 阅读全文
posted @ 2017-12-11 19:14 zzfx 阅读(192) 评论(0) 推荐(0)
摘要: Dispatch Queues Dispatch queues are a C-based mechanism for executing custom tasks. A dispatch queue executes tasks either serially or concurrently bu 阅读全文
posted @ 2017-12-11 19:08 zzfx 阅读(289) 评论(0) 推荐(0)
摘要: 所有崩溃都有cpu执行指令引起。主要包含两种:1)指令非法;2)访问非法。 访问非法又包含两种:(1)访问不存在;2)访问越界;3()访问受限。 指令非法:cpu不支持的指令。 An illegal opcode, also called an undocumented instruction, i 阅读全文
posted @ 2017-12-07 16:59 zzfx 阅读(268) 评论(0) 推荐(0)
摘要: When you create a static library you don't link in the dependent libraries. As a result, when you rename one of the files from .m to .mm it starts to 阅读全文
posted @ 2017-12-07 15:13 zzfx 阅读(404) 评论(0) 推荐(0)
摘要: 信号机制的本质是操作系统向应用的单向通信。 阅读全文
posted @ 2017-12-07 14:37 zzfx 阅读(153) 评论(0) 推荐(0)
摘要: 语言混编的核心在于建立联系。 语言混编是两种以上的语言合作,利用各自的优点,协作完成软件的功能。 要完成语言的混合编程开发,需要各种层次的支持,分别是开发时、编译时、运行时;同时要准对不同语言的特点区别对待。 开发要做的事情: 1)建立语言同等层次的对象和值的映射关系; 2)建立联系;包含赋值、调用 阅读全文
posted @ 2017-12-07 11:08 zzfx 阅读(570) 评论(0) 推荐(0)
摘要: 理论上完美的可执行文件可以不包含任何符号; 之所以有的可执行文件包含符号,是为了支持语言的运行时特点;比如c++和oc; 更进一步,理论上只包含函数符号和地址的对应关系即可,比如c++; 但是对于oc语言,变量是作为运行时结构的一部分存在的,所以变量符号在可执行文件中也存在。 阅读全文
posted @ 2017-12-07 10:44 zzfx 阅读(1327) 评论(0) 推荐(0)
摘要: Address space layout randomization (ASLR) is a computer security technique involved in preventing exploitation of memory corruption vulnerabilities. I 阅读全文
posted @ 2017-12-05 16:59 zzfx 阅读(829) 评论(0) 推荐(0)
摘要: ASLR: Address space layout randomization:地址空间布局随机化,是参与保护缓冲区溢出问题的一个计算机安全技术。是为了防止攻击者在内存中能够可靠地对跳转到特定利用函数。ASLR包括随机排列程序的关键数据区域的位置,包括可执行的部分、堆、栈及共享库的位置。历史:在1 阅读全文
posted @ 2017-12-05 16:57 zzfx 阅读(3029) 评论(0) 推荐(0)
摘要: 1、程序存储器(program storage)在计算机的主存储器中专门用来存放程序、子程序的一个区域。2、指令寄存器(IR ):用来保存当前正在执行的一条指令。当执行一条指令时,先把它从内存取到数据寄存器(DR)中,然后再传送至IR。指令划分为操作码和地址码字段,由二进制数字组成。为了执行任何给定 阅读全文
posted @ 2017-12-05 16:01 zzfx 阅读(6893) 评论(0) 推荐(1)
摘要: Symbols have always presented a conundrum for developers: You want to remove all symbols from your program because this makes the code smaller, and po 阅读全文
posted @ 2017-12-05 11:36 zzfx 阅读(186) 评论(0) 推荐(0)
摘要: Architecture The foundation layer of Darwin and OS X is composed of several architectural components, as shown in Figure 3-3. Taken together, these co 阅读全文
posted @ 2017-12-04 18:58 zzfx 阅读(381) 评论(0) 推荐(0)
摘要: http://my.oschina.net/chenliang165/blog/125825. 最近同事的程序设计过程中用到了Linux的signal机制,从而引发了我对Linux中signal机制的思考。Signal机制在Linux中是一个非常常用的进程间通信机制,很多人在使用的时候不会考虑该机制 阅读全文
posted @ 2017-12-04 18:32 zzfx 阅读(1770) 评论(0) 推荐(0)
摘要: 调试器工作原理(3):调试信息 本文是调试器工作原理探究系列的第三篇,在阅读前请先确保已经读过本系列的第一和第二篇。 本篇主要内容 在本文中我将向大家解释关于调试器是如何在机器码中寻找C函数以及变量的,以及调试器使用了何种数据能够在C源代码的行号和机器码中来回映射。 调试信息 现代的编译器在转换高级 阅读全文
posted @ 2017-12-04 11:58 zzfx 阅读(2332) 评论(0) 推荐(0)
摘要: 一、绝对布局、layoutsubviews。 二、父视图相对布局 注意:Autoresizing只能设置父子视图之间的关系,也就是说,Autoresizing只能控制子视图和父视图之间的位置/大小关系。Autoresizing不能设置兄弟视图之间的关系,当然也不能设置完全不相关的两个视图之间的关系。 阅读全文
posted @ 2017-11-30 18:59 zzfx 阅读(284) 评论(0) 推荐(0)
摘要: The Runtime Interaction Model for Views Any time a user interacts with your user interface, or any time your own code programmatically changes somethi 阅读全文
posted @ 2017-11-30 18:19 zzfx 阅读(316) 评论(0) 推荐(0)
上一页 1 ··· 79 80 81 82 83 84 85 86 87 ··· 102 下一页