Skip to content

Commit 1df8366

Browse files
authored
Merge pull request #3517 from msebolt/code-escape-pr9
Code escape pr9
2 parents dd11117 + 8210867 commit 1df8366

20 files changed

+2119
-2119
lines changed

docs/c-runtime-library/reference/aligned-malloc.md

+9-9
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ f1_keywords: ["_aligned_malloc", "alligned_malloc"]
1010
helpviewer_keywords: ["aligned_malloc function", "_aligned_malloc function"]
1111
ms.assetid: fb788d40-ee94-4039-aa4d-97d73dab1ca0
1212
---
13-
# _aligned_malloc
13+
# `_aligned_malloc`
1414

1515
Allocates memory on a specified alignment boundary.
1616

@@ -25,33 +25,33 @@ void * _aligned_malloc(
2525

2626
### Parameters
2727

28-
*size*<br/>
28+
*`size`*<br/>
2929
Size of the requested memory allocation.
3030

31-
*alignment*<br/>
31+
*`alignment`*<br/>
3232
The alignment value, which must be an integer power of 2.
3333

3434
## Return Value
3535

36-
A pointer to the memory block that was allocated or NULL if the operation failed. The pointer is a multiple of *alignment*.
36+
A pointer to the memory block that was allocated or `NULL` if the operation failed. The pointer is a multiple of *`alignment`*.
3737

3838
## Remarks
3939

40-
**_aligned_malloc** is based on [malloc](malloc.md).
40+
**`_aligned_malloc`** is based on [`malloc`](malloc.md).
4141

42-
**_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).
42+
**`_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).
4343

44-
This function sets `errno` to `ENOMEM` if the memory allocation failed or if the requested size was greater than `_HEAP_MAXREQ`. For more information about `errno`, see [errno, _doserrno, _sys_errlist, and _sys_nerr](../../c-runtime-library/errno-doserrno-sys-errlist-and-sys-nerr.md). Also, **_aligned_malloc** validates its parameters. If *alignment* is not a power of 2 or *size* is zero, this function invokes the invalid parameter handler, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, this function returns NULL and sets `errno` to `EINVAL`.
44+
This function sets `errno` to `ENOMEM` if the memory allocation failed or if the requested size was greater than `_HEAP_MAXREQ`. For more information about `errno`, see [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../../c-runtime-library/errno-doserrno-sys-errlist-and-sys-nerr.md). Also, **`_aligned_malloc`** validates its parameters. If *`alignment`* is not a power of 2 or *`size`* is zero, this function invokes the invalid parameter handler, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, this function returns NULL and sets `errno` to `EINVAL`.
4545

46-
Use [_aligned_free](aligned-free.md) to deallocate memory obtained by both **_aligned_malloc** and `_aligned_offset_malloc`. Don't use `free`, which doesn't reclaim the aligned memory correctly and can lead to hard-to-diagnose bugs.
46+
Use [`_aligned_free`](aligned-free.md) to deallocate memory obtained by both **`_aligned_malloc`** and `_aligned_offset_malloc`. Don't use `free`, which doesn't reclaim the aligned memory correctly and can lead to hard-to-diagnose bugs.
4747

4848
By default, this function's global state is scoped to the application. To change this, see [Global state in the CRT](../global-state.md).
4949

5050
## Requirements
5151

5252
|Routine|Required header|
5353
|-------------|---------------------|
54-
|**_aligned_malloc**|\<malloc.h>|
54+
|**`_aligned_malloc`**|`<malloc.h>`|
5555

5656
## Example
5757

docs/c-runtime-library/reference/countof-macro.md

+7-7
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ f1_keywords: ["_countof", "countof"]
99
helpviewer_keywords: ["countof macro", "_countof macro"]
1010
ms.assetid: 86198767-f7e5-4beb-898d-3cbbf60350a3
1111
---
12-
# _countof Macro
12+
# `_countof` Macro
1313

1414
Computes the number of elements in a statically-allocated array.
1515

@@ -21,24 +21,24 @@ Computes the number of elements in a statically-allocated array.
2121
2222
### Parameters
2323
24-
*array*<br/>
24+
*`array`*<br/>
2525
The name of an array.
2626
2727
## Return Value
2828
29-
The number of elements in the array, expressed as a **size_t**.
29+
The number of elements in the array, expressed as a **`size_t`**.
3030
3131
## Remarks
3232
33-
**_countof** is implemented as a function-like preprocessor macro. The C++ version has extra template machinery to detect at compile time if a pointer is passed instead of a statically declared array.
33+
**`_countof`** is implemented as a function-like preprocessor macro. The C++ version has extra template machinery to detect at compile time if a pointer is passed instead of a statically declared array.
3434
35-
Ensure that *array* is actually an array, not a pointer. In C, **_countof** produces erroneous results if *array* is a pointer. In C++, **_countof** fails to compile if *array* is a pointer. An array passed as a parameter to a function *decays to a pointer*, which means that within the function, you can't use **_countof** to determine the extent of the array.
35+
Ensure that *`array`* is actually an array, not a pointer. In C, **`_countof`** produces erroneous results if *`array`* is a pointer. In C++, **`_countof`** fails to compile if *`array`* is a pointer. An array passed as a parameter to a function *decays to a pointer*, which means that within the function, you can't use **`_countof`** to determine the extent of the array.
3636
3737
## Requirements
3838
3939
|Macro|Required header|
4040
|-----------|---------------------|
41-
|**_countof**|\<stdlib.h>|
41+
|**`_countof`**|`<stdlib.h>`|
4242
4343
## Example
4444
@@ -69,4 +69,4 @@ _countof(arr) = 20 elements
6969
7070
## See also
7171
72-
[sizeof Operator](../../cpp/sizeof-operator.md)<br/>
72+
[`sizeof` Operator](../../cpp/sizeof-operator.md)<br/>

0 commit comments

Comments
 (0)