Skip to content

Latest commit

 

History

History
56 lines (40 loc) · 1.72 KB

File metadata and controls

56 lines (40 loc) · 1.72 KB
description Learn more about: _callnewh
title _callnewh
ms.date 4/2/2020
api_name
_callnewh
_o__callnewh
api_location
msvcrt.dll
msvcr80.dll
msvcr90.dll
msvcr100.dll
msvcr100_clr0400.dll
msvcr110.dll
msvcr110_clr0400.dll
msvcr120.dll
msvcr120_clr0400.dll
ucrtbase.dll
api-ms-win-crt-heap-l1-1-0.dll
api-ms-win-crt-private-l1-1-0.dll
api_type
DLLExport
topic_type
apiref
f1_keywords
_callnewh
helpviewer_keywords
_callnewh
ms.assetid 4dcb73e9-6384-4d12-a973-a8807d4de7a8

_callnewh

Calls the currently installed new handler.

Syntax

int _callnewh(
   size_t size
   )

Parameters

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

Return Value

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

Exceptions

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

Remarks

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.

By default, this function's global state is scoped to the application. To change this, see Global state in the CRT.

Requirements

Routine Required header
_callnewh internal.h

See also

_set_new_handler
_set_new_mode