_callnewh

 

The new home for Visual Studio documentation is Visual Studio 2017 Documentation on docs.microsoft.com.

The latest version of this topic can be found at _callnewh.

Calls the currently installed new handler.

int _callnewh(  
   size_t size  
   )  

Parameters

size
The amount of memory that the new operator tried to allocate.

ValueDescription
0Failure: Either no new handler is installed or no new handler is active.
1Success: The new handler is installed and active. The memory allocation can be retried.

This function throws bad_alloc if the new handler can’t be located.

The new handler is called if the new operator fails to successfully allocate memory. The new handler might then initiate some appropriate action, such as freeing memory so that subsequent allocations succeed.

RoutineRequired header
_callnewhinternal.h

_set_new_handler
_set_new_mode

Show: