/********************************************************************* * _recalloc (MSVCR100.@) */ void* CDECL _recalloc(void *mem, MSVCRT_size_t num, MSVCRT_size_t size) { MSVCRT_size_t old_size; void *ret; if(!mem) return MSVCRT_calloc(num, size); size = num*size; old_size = _msize(mem); ret = MSVCRT_realloc(mem, size); if(!ret) { *MSVCRT__errno() = MSVCRT_ENOMEM; return NULL; } if(size>old_size) memset((BYTE*)ret+old_size, 0, size-old_size); return ret; }
/********************************************************************* * _calloc_base (UCRTBASE.@) */ void* CDECL _calloc_base(MSVCRT_size_t count, MSVCRT_size_t size) { return MSVCRT_calloc(count, size); }