The code shown in Listing 1 shows both a memory leak and a dangling pointer.
显示在列表1中的代码展示了一个内存渗漏和一个不断摆动的指针。
If we don't need to do a GC, allocation is 1 moving a pointer forward and 2 clearing the memory for the new object.
如果我们不需要进行GC,分配就是1将指针前移2为新对象清除内存。
The next line, C3, takes the pointer in eax and stores it back into the instance reference at memory location 049388C8.
下一行代码,C3,获取 eax中的指针并将其存储回内存位置为 049388C8的实例引用。
The virtual memory area (VMA) pointer needs to be added in as the first parameter followed by the usual four parameters (start, end, size, and protection flags).
虚拟内存区域(VMA)指针要作为第一个参数,然后是四个常用的参数(start,end,size和protection标记)。
For example, if t is the pool created using the pool interface and m is a pointer allocated from t, then t.free (m) returns the memory to t (it's added to t's free list).
例如,如果t是使用pool接口来创建的池,并且m是从t分配的指针,则t. f ree (m)将把内存返回给t(将其添加到t的空闲内存列表)。
Listing 1. Code with memory leak and dangling pointer (mem_errors.c).
列表1 .带有一个内存渗漏和一个不断摆动的指针的代码(mem_errors. c)。
When strdup is called in foo , the namestr variable value is overwritten, thereby losing the pointer to the memory allocated in main , and that causes the leak.
当strdup在foo中被调用,这个namestr变量值就会被覆写,从而丢失main中内存分配的指针,导致渗漏。
The only thing we have to do to free memory is to take the pointer we're given, back up sizeof (struct mem_control_block) bytes, and mark it as available. Here is the code for that.
为了释放内存,我们必须要做的惟一一件事情就是,获得我们给出的指针,回退size of (struct mem_control_block)个字节,并将其标记为可用的。
The main SPE program will receive an effective address pointer to a struct containing the size and pointer of a string in main memory.
主s PE程序将接收到包含字符串大小和指针的struct的有效地址指针。
The clear_user function is used to zero a block of memory in user space. This function takes a pointer in user space and a size to zero, which is defined in bytes.
clear_user函数被用于将用户空间的内存块清零。
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.
清单1中的代码将分配两个 512字节的内存块,然后指向第一个内存块的指针被设定为指向第二个内存块。
The benefits of GC to application development — including pointer safety, leak avoidance, and freeing developers from needing to write custom memory-management tooling — are well documented.
应用程序开发中GC的益处——包括指针安全、避免内存泄露以及使开发人员免于编写定制的内存管理工具——已经被很好地证明。
Instead of having multiple directly accessible arguments, you get a pointer into main memory and the SPE has to issue DMA requests to get the pointed-to data from main memory.
它没有使用多个可直接访问的参数,而是使用一个指向主存的指针,SPE需要发出dma请求来从主存中获取指针所指向的数据。
The code at BE allocates the memory from the heap for the Singleton object and stores a pointer to that memory in eax.
be处的代码为Singleton对象从堆中分配内存,并将一个指向该块内存的指针存储到eax中。
Where exactly does namestr get written with another address value, and thereby lose the last pointer to memory allocated in main(), causing the leak?
在什么地方namestr与其它地址数值一起被编写,从而丢失分配在main() 中的最后一个内存指针,最终导致渗漏吗?
This system call requires the file descriptor from shm_open and returns a pointer to memory.
这个系统调用需要shm_open返回的文件描述符,它返回指向内存的指针。
The system call is invoked with two arguments: a long integer containing the amount of memory to allocate and a long integer pointer to store the returned address.
这个系统调用要求两个参数:一个包含要分配内存数量的长整数,还有一个存储返回的地址的长整数指针。
When you create a buffer, you just get a pointer to it, and that's the same memory that the GPU sees.
当你创建一个缓冲区时,得到一个指针,GPU也看到了同样的内存。
Gets a pointer to an internal interface instance used to read and write metadata in memory.
获取指向用于读写内存中的元数据的内部接口实例的指针。
The Clone Allocator concept is introduced to formalize the way pointer containers control memory of the stored objects (and not the Pointers to the stored objects).
克隆分配器概念的引入是为了对指针容器控制所存对象的内存(不是指针的内存)的方法进行规范化。
Initialized which include: adjusted stack pointer, the need to use the internal data memory of the initialization, set up the boot nc power output voltage and CPU interruption of the set.
此中初始化包括:调解堆栈指针、需要使用的内部数据存储器的初始化、设置数控电源的开机输出电压以及CPU中断部分设置。
In this context, an invalid pointer is one that points to an invalid region in memory, is NULL, contains an unaligned pointer, points to memory block smaller than necessary, and so on.
在这个上下文,一个无效的指针是一个指向无效内存中的区域,是NULL,包含一个不对齐的指针,指向的内存块比必须的还小,等等。
The module can detect memory leak, write overflow, free wild pointer and mismatch using of memory functions of the executable files.
可以检测内存泄漏、内存写溢出、释放野指针和内存管理函数的不匹配等问题。
The third set contains segment registers that are used to specify these portions of memory, and the fourth set contains the instruction pointer.
第二组包含指针和索引寄存器,用于定位在一个特定的内存部分的信息。
The pointer will have some random value that, with luck, will point into an area of memory that is not available to your program and the kernel will kill your program before it can do any damage.
这个指针会有一个随机值,如果运气好的话,它将会指向一个你程序不可用的内存区域,那么内核将会在它造成什么伤害前干掉你的程序。
Through pointer mapping sets and fault model, it can detect bad deallocation, memory leak and null pointer dereference faults automatically and increase the testing efficiency.
通过指针映射集和故障模型,可以自动检测内存释放异常、内存泄露和空指针引用等动态内存故障,提高了测试效率。
The method can be used to detect safety holes, such as illegal pointer references, memory leaks, and other resource leaks, at a low cost and with high flexibility.
该方法具有代价小,灵活性强的特点,可用来检查程序中指针非法引用、内存泄漏及其他资源泄漏等安全漏洞。
Applying structure pointer and dynamic data structure, such as the linked list and queue in c, we have made the working software executed with less memory requirement and time overhead.
并根据C语言结构功能强的特点,采用结构指针及链表、队列等动态数据结构,使整个算法具有节省内存、快速省时的特点。
This method builds and analyzes pointer trees for programs and can detect and localize the dynamic memory errors effectively.
该方法为程序建立并分析指针树,能够有效地检测和定位几类常见动态存储错误。
Well, it turns out on most computers an address of the location and memory, aka a pointer, is itself 32 bits.
好的,它是一个计算机内存地址,或者说一个指针,占32位。
应用推荐