You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: docs/c-runtime-library/reference/abort.md
+7-7
Original file line number
Diff line number
Diff line change
@@ -39,7 +39,7 @@ void abort( void );
39
39
40
40
**Microsoft Specific**
41
41
42
-
By default, when an app is built with the debug runtime library, the `abort` routine displays an error message before `SIGABRT` is raised. For console apps running in console mode, the message is sent to `STDERR`. Windows desktop apps and console apps running in windowed mode display the message in a message box. To suppress the message, use [_set_abort_behavior](../../c-runtime-library/reference/set-abort-behavior.md) to clear the `_WRITE_ABORT_MSG` flag. The message displayed depends on the version of the runtime environment used. For applications built by using the most recent versions of Visual C++, the message resembles this:
42
+
By default, when an app is built with the debug runtime library, the `abort` routine displays an error message before `SIGABRT` is raised. For console apps running in console mode, the message is sent to `STDERR`. Windows desktop apps and console apps running in windowed mode display the message in a message box. To suppress the message, use [_set_abort_behavior](set-abort-behavior.md) to clear the `_WRITE_ABORT_MSG` flag. The message displayed depends on the version of the runtime environment used. For applications built by using the most recent versions of Visual C++, the message resembles this:
43
43
44
44
> R6010 - abort() has been called
45
45
@@ -49,11 +49,11 @@ In previous versions of the C runtime library, this message was displayed:
49
49
50
50
When the program is compiled in debug mode, the message box displays options to **Abort**, **Retry**, or **Ignore**. If the user chooses **Abort**, the program terminates immediately and returns an exit code of 3. If the user chooses **Retry**, a debugger is invoked for just-in-time debugging, if available. If the user chooses **Ignore**, `abort` continues normal processing.
51
51
52
-
In both retail and debug builds, `abort` then checks whether an abort signal handler is set. If a non-default signal handler is set, `abort` calls `raise(SIGABRT)`. Use the [signal](../../c-runtime-library/reference/signal.md) function to associate an abort signal handler function with the `SIGABRT` signal. You can perform custom actions—for example, clean up resources or log information—and terminate the app with your own error code in the handler function. If no custom signal handler is defined, `abort` does not raise the `SIGABRT` signal.
52
+
In both retail and debug builds, `abort` then checks whether an abort signal handler is set. If a non-default signal handler is set, `abort` calls `raise(SIGABRT)`. Use the [signal](signal.md) function to associate an abort signal handler function with the `SIGABRT` signal. You can perform custom actions—for example, clean up resources or log information—and terminate the app with your own error code in the handler function. If no custom signal handler is defined, `abort` does not raise the `SIGABRT` signal.
53
53
54
54
By default, in non-debug builds of desktop or console apps, `abort` then invokes the Windows Error Reporting Service mechanism (formerly known as Dr. Watson) to report failures to Microsoft. This behavior can be enabled or disabled by calling `_set_abort_behavior` and setting or masking the `_CALL_REPORTFAULT` flag. When the flag is set, Windows displays a message box that has text something like "A problem caused the program to stop working correctly." The user can choose to invoke a debugger with a **Debug** button, or choose the **Close program** button to terminate the app with an error code that's defined by the operating system.
55
55
56
-
If the Windows error reporting handler is not invoked, then `abort` calls [_exit](../../c-runtime-library/reference/exit-exit-exit.md) to terminate the process with exit code 3 and returns control to the parent process or the operating system. `_exit` does not flush stream buffers or do `atexit`/`_onexit` processing.
56
+
If the Windows error reporting handler is not invoked, then `abort` calls [_exit](exit-exit-exit.md) to terminate the process with exit code 3 and returns control to the parent process or the operating system. `_exit` does not flush stream buffers or do `atexit`/`_onexit` processing.
57
57
58
58
For more information about CRT debugging, see [CRT Debugging Techniques](/visualstudio/debugger/crt-debugging-techniques).
59
59
@@ -107,9 +107,9 @@ File could not be opened: No such file or directory
Copy file name to clipboardexpand all lines: docs/c-runtime-library/reference/access-crt.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -21,4 +21,4 @@ manager: "ghogen"
21
21
ms.workload: ["cplusplus"]
22
22
---
23
23
# access (CRT)
24
-
This POSIX function is deprecated. Use the ISO C++ conformant [_access](../../c-runtime-library/reference/access-waccess.md) or security-enhanced [_access_s](../../c-runtime-library/reference/access-s-waccess-s.md) instead.
24
+
This POSIX function is deprecated. Use the ISO C++ conformant [_access](access-waccess.md) or security-enhanced [_access_s](access-s-waccess-s.md) instead.
Copy file name to clipboardexpand all lines: docs/c-runtime-library/reference/access-s-waccess-s.md
+7-7
Original file line number
Diff line number
Diff line change
@@ -22,7 +22,7 @@ ms.workload: ["cplusplus"]
22
22
---
23
23
# _access_s, _waccess_s
24
24
25
-
Determines file read/write permissions. This is a version of [_access, _waccess](../../c-runtime-library/reference/access-waccess.md) with security enhancements as described in [Security Features in the CRT](../../c-runtime-library/security-features-in-the-crt.md).
25
+
Determines file read/write permissions. This is a version of [_access, _waccess](access-waccess.md) with security enhancements as described in [Security Features in the CRT](../../c-runtime-library/security-features-in-the-crt.md).
26
26
27
27
## Syntax
28
28
@@ -94,7 +94,7 @@ These functions validate their parameters. If *path* is `NULL` or *mode* does no
94
94
95
95
This example uses `_access_s` to check the file named crt_access_s.c to see whether it exists and whether writing is allowed.
96
96
97
-
```
97
+
```C
98
98
// crt_access_s.c
99
99
100
100
#include<io.h>
@@ -137,8 +137,8 @@ File crt_access_s.c does not have write permission.
Copy file name to clipboardexpand all lines: docs/c-runtime-library/reference/access-waccess.md
+11-14
Original file line number
Diff line number
Diff line change
@@ -22,7 +22,7 @@ ms.workload: ["cplusplus"]
22
22
---
23
23
# _access, _waccess
24
24
25
-
Determines if a file is read-only or not. More secure versions are available; see [_access_s, _waccess_s](../../c-runtime-library/reference/access-s-waccess-s.md).
25
+
Determines if a file is read-only or not. More secure versions are available; see [_access_s, _waccess_s](access-s-waccess-s.md).
26
26
27
27
## Syntax
28
28
@@ -49,14 +49,11 @@ Read/write attribute.
49
49
50
50
Each function returns 0 if the file has the given mode. The function returns -1 if the named file does not exist or does not have the given mode; in this case, `errno` is set as shown in the following table.
51
51
52
-
`EACCES`
53
-
Access denied: the file's permission setting does not allow specified access.
54
-
55
-
`ENOENT`
56
-
File name or path not found.
57
-
58
-
`EINVAL`
59
-
Invalid parameter.
52
+
|||
53
+
|-|-|
54
+
`EACCES`|Access denied: the file's permission setting does not allow specified access.
55
+
`ENOENT`|File name or path not found.
56
+
`EINVAL`|Invalid parameter.
60
57
61
58
For more information about these and other return codes, see [_doserrno, errno, _sys_errlist, and _sys_nerr](../../c-runtime-library/errno-doserrno-sys-errlist-and-sys-nerr.md).
62
59
@@ -94,7 +91,7 @@ This function validates its parameters. If *path* is `NULL` or *mode* does not s
94
91
95
92
The following example uses `_access` to check the file named crt_ACCESS.C to see whether it exists and whether writing is allowed.
96
93
97
-
```
94
+
```C
98
95
// crt_access.c
99
96
// compile with: /W1
100
97
// This example uses _access to check the file named
@@ -127,7 +124,7 @@ File crt_ACCESS.C does not have write permission.
Copy file name to clipboardexpand all lines: docs/c-runtime-library/reference/aligned-free-dbg.md
+2-2
Original file line number
Diff line number
Diff line change
@@ -22,7 +22,7 @@ ms.workload: ["cplusplus"]
22
22
---
23
23
# _aligned_free_dbg
24
24
25
-
Frees a block of memory that was allocated with [_aligned_malloc](../../c-runtime-library/reference/aligned-malloc.md) or [_aligned_offset_malloc](../../c-runtime-library/reference/aligned-offset-malloc.md) (debug only).
25
+
Frees a block of memory that was allocated with [_aligned_malloc](aligned-malloc.md) or [_aligned_offset_malloc](aligned-offset-malloc.md) (debug only).
26
26
27
27
## Syntax
28
28
@@ -39,7 +39,7 @@ A pointer to the memory block that was returned to the `_aligned_malloc` or `_al
39
39
40
40
## Remarks
41
41
42
-
The `_aligned_free_dbg` function is a debug version of the [_aligned_free](../../c-runtime-library/reference/aligned-free.md) function. When [_DEBUG](../../c-runtime-library/debug.md) is not defined, each call to `_aligned_free_dbg` is reduced to a call to `_aligned_free`. Both `_aligned_free` and `_aligned_free_dbg` free a memory block in the base heap, but `_aligned_free_dbg` accommodates a debugging feature: the ability to keep freed blocks in the heap's linked list to simulate low memory conditions.
42
+
The `_aligned_free_dbg` function is a debug version of the [_aligned_free](aligned-free.md) function. When [_DEBUG](../../c-runtime-library/debug.md) is not defined, each call to `_aligned_free_dbg` is reduced to a call to `_aligned_free`. Both `_aligned_free` and `_aligned_free_dbg` free a memory block in the base heap, but `_aligned_free_dbg` accommodates a debugging feature: the ability to keep freed blocks in the heap's linked list to simulate low memory conditions.
43
43
44
44
`_aligned_free_dbg` performs a validity check on all specified files and block locations before performing the free operation. The application is not expected to provide this information. When a memory block is freed, the debug heap manager automatically checks the integrity of the buffers on either side of the user portion and issues an error report if overwriting has occurred. If the `_CRTDBG_DELAY_FREE_MEM_DF` bit field of the [_crtDbgFlag](../../c-runtime-library/crtdbgflag.md) flag is set, the freed block is filled with the value 0xDD, assigned the `_FREE_BLOCK` block type, and kept in the heap's linked list of memory blocks.
Copy file name to clipboardexpand all lines: docs/c-runtime-library/reference/aligned-free.md
+3-3
Original file line number
Diff line number
Diff line change
@@ -22,7 +22,7 @@ ms.workload: ["cplusplus"]
22
22
---
23
23
# _aligned_free
24
24
25
-
Frees a block of memory that was allocated with [_aligned_malloc](../../c-runtime-library/reference/aligned-malloc.md) or [_aligned_offset_malloc](../../c-runtime-library/reference/aligned-offset-malloc.md).
25
+
Frees a block of memory that was allocated with [_aligned_malloc](aligned-malloc.md) or [_aligned_offset_malloc](aligned-offset-malloc.md).
26
26
27
27
## Syntax
28
28
@@ -41,7 +41,7 @@ A pointer to the memory block that was returned to the `_aligned_malloc` or `_al
41
41
42
42
`_aligned_free` is marked `__declspec(noalias)`, meaning that the function is guaranteed not to modify global variables. For more information, see [noalias](../../cpp/noalias.md).
43
43
44
-
This function does not validate its parameter, unlike the other _aligned CRT functions. If *memblock* is a `NULL` pointer, this function simply performs no actions. It does not change `errno` and it does not invoke the invalid parameter handler. If an error occurs in the function due to not using _aligned functions previously to allocate the block of memory or a misalignment of memory occurs due to some unforeseen calamity, the function generates a debug report from the [_RPT, _RPTF, _RPTW, _RPTFW Macros](../../c-runtime-library/reference/rpt-rptf-rptw-rptfw-macros.md).
44
+
This function does not validate its parameter, unlike the other _aligned CRT functions. If *memblock* is a `NULL` pointer, this function simply performs no actions. It does not change `errno` and it does not invoke the invalid parameter handler. If an error occurs in the function due to not using _aligned functions previously to allocate the block of memory or a misalignment of memory occurs due to some unforeseen calamity, the function generates a debug report from the [_RPT, _RPTF, _RPTW, _RPTFW Macros](rpt-rptf-rptw-rptfw-macros.md).
45
45
46
46
## Requirements
47
47
@@ -51,7 +51,7 @@ This function does not validate its parameter, unlike the other _aligned CRT fun
51
51
52
52
## Example
53
53
54
-
For more information, see [_aligned_malloc](../../c-runtime-library/reference/aligned-malloc.md).
54
+
For more information, see [_aligned_malloc](aligned-malloc.md).
Copy file name to clipboardexpand all lines: docs/c-runtime-library/reference/aligned-malloc-dbg.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -55,7 +55,7 @@ A pointer to the memory block that was allocated or `NULL` if the operation fail
55
55
56
56
## Remarks
57
57
58
-
`_aligned_malloc_dbg` is a debug version of the [_aligned_malloc](../../c-runtime-library/reference/aligned-malloc.md) function. When [_DEBUG](../../c-runtime-library/debug.md) is not defined, each call to `_aligned_malloc_dbg` is reduced to a call to `_aligned_malloc`. Both `_aligned_malloc` and `_aligned_malloc_dbg` allocate a block of memory in the base heap, but `_aligned_malloc_dbg` offers several debugging features: buffers on either side of the user portion of the block to test for leaks, and *filename*/*linenumber* information to determine the origin of allocation requests.
58
+
`_aligned_malloc_dbg` is a debug version of the [_aligned_malloc](aligned-malloc.md) function. When [_DEBUG](../../c-runtime-library/debug.md) is not defined, each call to `_aligned_malloc_dbg` is reduced to a call to `_aligned_malloc`. Both `_aligned_malloc` and `_aligned_malloc_dbg` allocate a block of memory in the base heap, but `_aligned_malloc_dbg` offers several debugging features: buffers on either side of the user portion of the block to test for leaks, and *filename*/*linenumber* information to determine the origin of allocation requests.
59
59
60
60
`_aligned_malloc_dbg` allocates the memory block with slightly more space than the requested *size*. The additional space is used by the debug heap manager to link the debug memory blocks and to provide the application with debug header information and overwrite buffers. When the block is allocated, the user portion of the block is filled with the value 0xCD and each of the overwrite buffers are filled with 0xFD.
Copy file name to clipboardexpand all lines: docs/c-runtime-library/reference/aligned-malloc.md
+2-2
Original file line number
Diff line number
Diff line change
@@ -47,7 +47,7 @@ A pointer to the memory block that was allocated or `NULL` if the operation fail
47
47
48
48
## Remarks
49
49
50
-
`_aligned_malloc` is based on [malloc](../../c-runtime-library/reference/malloc.md).
50
+
`_aligned_malloc` is based on [malloc](malloc.md).
51
51
52
52
`_aligned_malloc` is marked `__declspec(noalias)` and `__declspec(restrict)`, meaning that the function is guaranteed not to modify global variables and that the pointer returned is not aliased. For more information, see [noalias](../../cpp/noalias.md) and [restrict](../../cpp/restrict.md).
53
53
@@ -61,7 +61,7 @@ This function sets `errno` to `ENOMEM` if the memory allocation failed or if the
Copy file name to clipboardexpand all lines: docs/c-runtime-library/reference/aligned-msize-dbg.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -53,7 +53,7 @@ Returns the size (in bytes) as an unsigned integer.
53
53
54
54
The *alignment* and *offset* values must be the same as the values passed to the function that allocated the block.
55
55
56
-
`_aligned_msize_dbg` is a debug version of the [_aligned_msize](../../c-runtime-library/reference/aligned-msize.md) function. When [_DEBUG](../../c-runtime-library/debug.md) is not defined, each call to `_aligned_msize_dbg` is reduced to a call to `_aligned_msize`. Both `_aligned_msize` and `_aligned_msize_dbg` calculate the size of a memory block in the base heap, but `_aligned_msize_dbg` adds a debugging feature: It includes the buffers on either side of the user portion of the memory block in the returned size.
56
+
`_aligned_msize_dbg` is a debug version of the [_aligned_msize](aligned-msize.md) function. When [_DEBUG](../../c-runtime-library/debug.md) is not defined, each call to `_aligned_msize_dbg` is reduced to a call to `_aligned_msize`. Both `_aligned_msize` and `_aligned_msize_dbg` calculate the size of a memory block in the base heap, but `_aligned_msize_dbg` adds a debugging feature: It includes the buffers on either side of the user portion of the memory block in the returned size.
57
57
58
58
This function validates its parameter. If *memblock* is a null pointer or *alignment* is not a power of 2, `_msize` invokes an invalid parameter handler, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If the error is handled, the function sets `errno` to `EINVAL` and returns -1.
0 commit comments