_heapadd_heapadd

将内存添加到堆。Adds memory to the heap.

重要

此函数已过时。This function is obsolete. 从 Visual Studio 2015 开始,CRT 中不再提供此函数。Beginning in Visual Studio 2015, it is not available in the CRT.

语法Syntax

int _heapadd(   
   void *memblock,  
   size_t size   
);  

参数Parameters

memblock
指向堆内存的指针。Pointer to the heap memory.

size
要添加的内存大小,以字节为单位。Size of memory to add, in bytes.

返回值Return Value

如果成功,_heapadd 会返回 0;否则,此函数会返回 -1,并将 errno 设置为 ENOSYSIf successful, _heapadd returns 0; otherwise, the function returns -1 and sets errno to ENOSYS.

有关此代码及其他返回代码的详细信息,请参阅 _doserrno、errno、_sys_errlist 和 _sys_nerrFor more information about this and other return codes, see _doserrno, errno, _sys_errlist, and _sys_nerr.

备注Remarks

从 Visual C++ 4.0 版开始,基础堆结构已移至 C 运行时库,以支持新的调试功能。Beginning with Visual C++ version 4.0, the underlying heap structure was moved to the C run-time libraries to support the new debugging features. 因此,基于 Win32 API 的任何平台上不再支持 _heapaddAs a result, _heapadd is no longer supported on any platform that is based on the Win32 API.

要求Requirements

例程Routine 必需的标头Required header 可选标头Optional header
_heapadd <malloc.h><malloc.h> <errno.h><errno.h>

有关兼容性的详细信息,请参阅“简介”中的兼容性For more compatibility information, see Compatibility in the Introduction.

另请参阅See Also

内存分配 Memory Allocation
free free
_heapchk _heapchk
_heapmin _heapmin
_heapset _heapset
_heapwalk _heapwalk
malloc malloc
reallocrealloc