ReactOS 0.4.16-dev-937-g7afcd2a
recalloc.cpp File Reference
#include <corecrt_internal.h>
#include <malloc.h>
#include <string.h>
Include dependency graph for recalloc.cpp:

Go to the source code of this file.

Functions

 __declspec (noinline) void *__cdecl _recalloc_base(void *const block
 
 if (new_block !=nullptr &&old_block_size< new_block_size)
 

Variables

size_t const count
 
size_t const size_t const size
 
size_t const old_block_size = block != nullptr ? _msize_base(block) : 0
 
size_t const new_block_size = count * size
 
void *const new_block = _realloc_base(block, new_block_size)
 

Function Documentation

◆ __declspec()

__declspec ( noinline  ) const

◆ if()

if ( )

Definition at line 38 of file recalloc.cpp.

39 {
40 memset(static_cast<char*>(new_block) + old_block_size, 0, new_block_size - old_block_size);
41 }
size_t const new_block_size
Definition: recalloc.cpp:32
void *const new_block
Definition: recalloc.cpp:34
size_t const old_block_size
Definition: recalloc.cpp:31
#define memset(x, y, z)
Definition: compat.h:39

Variable Documentation

◆ count

Definition at line 24 of file recalloc.cpp.

◆ new_block

return new_block = _realloc_base(block, new_block_size)

Definition at line 34 of file recalloc.cpp.

Referenced by if().

◆ new_block_size

size_t const new_block_size = count * size

Definition at line 32 of file recalloc.cpp.

Referenced by if().

◆ old_block_size

size_t const old_block_size = block != nullptr ? _msize_base(block) : 0

Definition at line 31 of file recalloc.cpp.

Referenced by if().

◆ size

Initial value:
{
#define ENOMEM
Definition: acclib.h:84
#define _HEAP_MAXREQ
Definition: malloc.h:24
GLuint GLuint GLsizei count
Definition: gl.h:1545
GLsizeiptr size
Definition: glext.h:5919
#define _VALIDATE_RETURN_NOEXC(expr, errorcode, retexpr)

Definition at line 25 of file recalloc.cpp.