始终正确处理返回动态分配的内存引用的函数返回值。
Always properly handle return values of functions returning references of dynamically allocated memory.
在清单2中,该函数分配了包含一个Buffer的内存块,并初始化它的条目以指明它是一个空抽象缓冲区。
In Listing 2, the function allocates a piece of memory containing a buffer and initializes its entries to indicate an empty abstract buffer.
在安装函数内部,调用了kzalloc(分配内核内存并清零)。
Internal to the setup function, there's a call to kzalloc (which allocates kernel memory and zeroes it).
清单3 中的函数释放链表中的所有内存块,然后释放由 newBuffer()分配的Buffer 。
The function in Listing 3 frees any memory blocks in the linked list, then frees the Buffer allocated by newBuffer().
结果,func函数所分配的20个字节的块就丢失了,并导致了内存泄漏。
As a result, the 20 byte block allocated by the func function is lost and results in a memory leak.
下面的探测脚本使用用户函数进入探测跟踪malloc例程,显示分配的内存量。
The following probe script USES the User Function Entry probe to track malloc routines and display the size of allocation.
现在这一类型的值可以通过内建的函数new来分配,这将返回一个指针,指向一块内存单元,其所占内存槽初始化为零。
Values of this type can now be allocated using the built-in function new, which returns a pointer to the value in memory with all slots initialized to the zero value.
错误的内存使用在使用内存分配和释放的函数不匹配时发生。
Incorrect memory use occurs when functions used for allocating and de-allocating memory do not match.
在 in_pcballoc 中,调用了内核的内存分配器函数,该函数将内存分配给Internet控制块。
Within in_pcballoc, the kernel's memory allocator function is called, which allocates memory to the Internet control block.
拷贝构造函数只在需要的情况下动态内存分配吗?
Copy constructor is needed only in the case of dynamic memory allocation?
显示一个层次结构树,它表示分析运行期间各个函数的执行路径和内存分配数据。
Displays a hierarchical tree that represents the execution paths and memory allocation data of functions in the profiling run.
列出分配了大多数内存的函数和类型。
Lists the functions and types that allocated the most memory.
显示一个层次结构树,它表示分析运行期间被检测函数的执行路径、内存分配数据和详细计时数据。
Displays a hierarchical tree that represents the execution paths, memory allocation data, and detailed timing data for instrumented functions in the profiling run.
按模块组织分析数据,并列出模块的函数、内存分配数据和详细计时信息。
Organizes profiling data by module, and lists the functions, memory allocation data, and detailed timing information for the module.
列出分析运行期间各个函数的指令的内存分配数据。
Lists memory allocation data for the instructions of functions in the profiling run.
在分析运行期间分配的,此函数的所有独占分配内存字节数的百分比。
The percentage of all bytes of memory that were allocated in the profiling run that were exclusive allocations of this function.
列出分析运行期间各个函数的源代码行的内存分配数据。
Lists memory allocation data for the source code lines of functions in the profiling run.
列出分析运行期间被检测函数的内存分配数据。
Lists memory allocation data for the instrumented functions in the profiling run.
此数目包括此函数所调用的各个函数中分配的内存。
The number includes memory that was allocated in functions that were called by this function.
此数量不包括当前函数所调用的各个函数分配的内存。
This number does not include memory that was allocated by functions that were called by the current function.
这个函数分配多重窗口结构的内存,并返回一个句柄。
This function allocates memory for a multiple-window position structure and returns the handle to the structure.
方法在分析内存泄漏的基础上,通过重新实现动态内存分配和释放函数,记录内存分配的确切位置并跟踪动态内存的使用情况。
Based on the analysis of memory leak, the method overloads the allocation function and overrides the free function to store the allocation spot and trace the dynamic memory allocation.
从浏览器内存空间中分配内存。使用这个函数来动态分配内存。
NPN_MemFree requests that the browser free a specified block of memory. Use this function to free memory allocated with NPN_MemAlloc.
列出所选函数的内存分配数据,调用所选函数的函数以及所选函数调用的函数。
Lists memory allocation data for a selected function, the functions that called the selected function, and the functions that were called by the selected function.
这个语言只定义了静态变量和函数局部变量两中内存分配机制。
The language does not define any storage allocation facility other than static definition and the provided by the local variables of functions...
由于函数可以把本地局部变量或参数的地址传给子函数,因此为局部变量分配固定内存几乎不可能。
Because procedures can pass the addresses of local variables and arguments to subprocedures, keeping local variables in static cells is unacceptably complex.
由于函数可以把本地局部变量或参数的地址传给子函数,因此为局部变量分配固定内存几乎不可能。
Because procedures can pass the addresses of local variables and arguments to subprocedures, keeping local variables in static cells is unacceptably complex.
应用推荐