...*storage); //析构函数 zend_mm_segment* (*_alloc)(zend_mm_storage *storage, size_t size); //内存分配函数 zend_mm_segment* (*_realloc)(zend_mm_storage *storage, zend_mm_segment *ptr, size_t size); //重新分配内存函数 ..
基于16个网页-相关网页
始终正确处理返回动态分配的内存引用的函数返回值。
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).
应用推荐