这个指针必须是一个绝对目录路径,因此您可能需要在自己的代码中调整该值。
This pointer must be an absolute directory path, so you may need to tweak this value in your own code.
此外,它并不指出在代码的何处这个空指针被赋值。
Furthermore, it says nothing about where in the code the null pointer was actually assigned.
关于方法指针,有意思的事情是:它们的使用可能就表明代码违反了迪米特法则。
The interesting thing about method Pointers is that their use can be an indication that the code violates the Law of Demeter.
悬空指针可能发生在以微妙方式使用内存的代码中。
Dangling Pointers are likely to arise in code, which USES memory in subtle ways.
显示在列表1中的代码展示了一个内存渗漏和一个不断摆动的指针。
The code shown in Listing 1 shows both a memory leak and a dangling pointer.
此类错误的典型示例是添加错误处理代码以处理NULL指针或错误的引用,却没有查出无效引用的真正原因。
A classic example of such a mistake is adding error handling code to take care of NULL Pointers or bad references without looking into the real cause of the invalid references.
现在,不要误会我:方法指针不是为了侵入代码或者获得对人们现金的引用!
Now, don't get me wrong: Method pointers aren't meant for hacking into code or obtaining references to people's cash!
即便我们可以采用不同的测量方式,例如代码行数、类的数量、函数指针的数量、系统漏洞的数量,等等,软件还是缺乏一种定义良好的原子结构。
Software also lacks a well defined atomic unit of work — even though we can apply various measures, such as lines-of-code, number of classes, number of function points, number of bugs, etc.
当时间到达12:59:59时,代码触发子程序,快速的将指针(或者弧形表盘)倒退并将时间重置到1:00——等着看这一幕总是那么的有趣。
When it becomes 12:59:59. the code triggers a subroutine that quickly runs the hands (or arcs) backward and resets the time to 1:00 - which is always fun to wait for and watch.
在SPE上的标量代码中,将标量值声明为向量和向量指针(即使没有将它们作为向量使用)可以加速代码的执行,因为这样就不会执行非对齐的加载和存储操作。
In scalar code on the spe, declaring scalar values as vectors and vector Pointers (even if you aren't using them as vectors) can speed up code because it doesn't have to do unaligned loads and stores.
这样将保护程序代码避免堆栈、缓冲区和函数指针溢出,而且全都不需重新编译。
This protects against stack, buffer, and function pointer overflows, all without recompilation.
在Solaris,下面这段示例代码让您可以获取堆栈指针。
On Solaris, this sample code allows you to get the stack pointer.
因此,代码回到循环的开头,指向正确的top指针(线程b修改后的),调用CAS,把20压入堆栈后结束。
So, the code loops back, points to the proper top pointer (which was changed because of Thread b), invokes CAS, and is done with pushing 20 into the stack.
在第2部分中,我将介绍如何重写函数指针并介绍组件组装和一些有趣的shell、网络、套接字代码示例。
In Part 2, I'll show how to overwrite a function pointer and cover assembly components and some juicy shell, network, socket code samples.
这需要修改oprofile的内核代码来周期性地对SPU指令指针进行采样。
This requires changes to the OProfile kernel code to sample the SPU instruction Pointers regularly.
清单8显示了向表格中的初始单元格填充值和指针的代码。
Listing 8 shows the code for filling in the score and pointer for an individual cell in the table.
be处的代码为Singleton对象从堆中分配内存,并将一个指向该块内存的指针存储到eax中。
The code at BE allocates the memory from the heap for the Singleton object and stores a pointer to that memory in eax.
它查找代码路径将会或者可能造成null指针异常的情况,它还查找对null的冗余比较的情况。
It looks for cases where a code path will or could cause a null pointer exception, and it also looks for cases in which there is a redundant comparison to null.
清单6包含的代码示例展示了如何声明一个状态信息结构,然后根据该结构的大小向stateinfo指针分配存储空间。
Listing 6 contains a code example of declaring a state information structure and then allocating storage for the stateInfo pointer based on the size of the structure.
在Win32系统中开发的C++代码是基于ILP32模型的,在该模型中,int、long和指针类型都是32位的。
C + + code developed in Win32 systems is based on the ILP32 model, where int, long, and pointer types are 32 bits.
代码把data转换成到GtkLabel的指针。
在得到标签的指针后,代码使用g_assert宏来确定标签是否等于NULL。
After obtaining the pointer to the label, the code USES the g_assert macro to determine if the label is equal to NULL.
列表1 .带有一个内存渗漏和一个不断摆动的指针的代码(mem_errors. c)。
Listing 1. Code with memory leak and dangling pointer (mem_errors.c).
在调用遗留代码的时候,可以通过调用导出的函数进行直接地调用,也可以通过使用函数指针进行间接地调用,但是内核必须完成以下工作
When legacy code is called, either directly by calling an exported function or indirectly by using a function pointer, the kernel must
这段代码将目标作为第一个参数,将一个代码函数的指针作为第二个参数进行传递。
The code passes the target as the first argument and a pointer to the code function as the second. The syntax for this is.
但是通过使用RationalPurify的运行时分析,您能够指出发生问题的对象指针的准确代码行(图10)。
By doing a runtime analysis with Rational Purify, however, you can pinpoint the exact line of code where the reference to the object in question has been created (Figure 10).
若list里面保存的是指针,那么增加下面代码。
在这段代码中,您首先要为标准输入声明一个文件指针,以便您能够在拼写检查过程中从键盘获得交互式信息。
In this code, you start by declaring a file pointer to standard input so that you can get interactive information from the keyboard during the spell-check process.
如果您需要编写这种代码,就可能会碰到可移植性的问题;您应该开发一个具有单独标记的结构,并使用这些结构,而不是使用指针。
If you need to write code like this, you are in trouble for portability; you should probably develop a structure with separate flags, and use these instead of Pointers.
清单1中的代码将分配两个 512字节的内存块,然后指向第一个内存块的指针被设定为指向第二个内存块。
The code in Listing 1 allocates two 512-byte blocks of memory, and then the pointer to the first block is set to the second block.
应用推荐