Skip to content

Commit 0064d37

Browse files
authored
Merge pull request #1866 from MicrosoftDocs/master
3/25/2019 AM Publish
2 parents 42e65c1 + 6fc488a commit 0064d37

File tree

6 files changed

+49
-10
lines changed

6 files changed

+49
-10
lines changed

docs/c-runtime-library/reference/strtok-s-strtok-s-l-wcstok-s-wcstok-s-l-mbstok-s-mbstok-s-l.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ unsigned char* _mbstok_s(
5050
char** context
5151
);
5252

53-
unsigned char* _mbstok_s(
53+
unsigned char* _mbstok_s_l(
5454
unsigned char* str,
5555
const unsigned char* delimiters,
5656
char** context,

docs/c-runtime-library/reference/strtok-strtok-l-wcstok-wcstok-l-mbstok-mbstok-l.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,25 @@ char *strtok(
2222
char *strToken,
2323
const char *strDelimit
2424
);
25+
char *strtok_l(
26+
char *strToken,
27+
const char *strDelimit,
28+
_locale_t locale
29+
);
2530
wchar_t *wcstok(
2631
wchar_t *strToken,
2732
const wchar_t *strDelimit
2833
);
34+
wchar_t *wcstok_l(
35+
wchar_t *strToken,
36+
const wchar_t *strDelimit,
37+
_locale_t locale
38+
);
2939
unsigned char *_mbstok(
3040
unsigned char*strToken,
3141
const unsigned char *strDelimit
3242
);
33-
unsigned char *_mbstok(
43+
unsigned char *_mbstok_l(
3444
unsigned char*strToken,
3545
const unsigned char *strDelimit,
3646
_locale_t locale

docs/cpp/TOC.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -318,6 +318,7 @@
318318
### [__declspec](declspec.md)
319319
#### [align](align-cpp.md)
320320
#### [allocate](allocate.md)
321+
#### [allocator](allocator.md)
321322
#### [appdomain](appdomain.md)
322323
#### [code_seg (__declspec)](code-seg-declspec.md)
323324
#### [deprecated](deprecated-cpp.md)

docs/cpp/allocator.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
---
2+
title: "allocator"
3+
ms.date: "03/21/2019"
4+
f1_keywords: ["allocator_cpp"]
5+
helpviewer_keywords: ["__declspec keyword [C++], allocator", "allocator __declspec keyword"]
6+
---
7+
# allocator
8+
9+
**Microsoft Specific**
10+
11+
The **allocator** declaration specifier can be applied to custom memory-allocation functions to make the allocations visible via Event Tracing for Windows (ETW).
12+
13+
## Syntax
14+
15+
```
16+
__declspec(allocator)
17+
```
18+
19+
## Remarks
20+
21+
The native memory profiler in Visual Studio works by collecting allocation ETW event data emitted by during runtime. Allocators in the CRT and Windows SDK have been annotated at the source level so that their allocation data can be captured. If you are writing your own allocators, then any functions that return a pointer to newly allocated heap memory can be decorated with `__declspec(allocator)`, as seen in this example for myMalloc:
22+
23+
```cpp
24+
__declspec(allocator) void* myMalloc(size_t size)
25+
```
26+
27+
For more information, see [Measure memory usage in Visual Studio](/visualstudio/profiling/memory-usage) and [Custom native ETW heap events](/visualstudio/profiling/custom-native-etw-heap-events).

docs/cpp/declspec.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: "__declspec"
3-
ms.date: "10/09/2018"
3+
ms.date: "03/21/2019"
44
f1_keywords: ["__declspec_cpp", "__declspec", "_declspec"]
55
helpviewer_keywords: ["__declspec keyword [C++]"]
66
---
@@ -22,6 +22,7 @@ The extended attribute syntax for specifying storage-class information uses the
2222
*extended-decl-modifier*:<br/>
2323
&nbsp;&nbsp;&nbsp;&nbsp;**align(** *#* **)**<br/>
2424
&nbsp;&nbsp;&nbsp;&nbsp;**allocate("** *segname* **")**<br/>
25+
&nbsp;&nbsp;&nbsp;&nbsp;**allocator**<br/>
2526
&nbsp;&nbsp;&nbsp;&nbsp;**appdomain**<br/>
2627
&nbsp;&nbsp;&nbsp;&nbsp;**code_seg("** *segname* **")**<br/>
2728
&nbsp;&nbsp;&nbsp;&nbsp;**deprecated**<br/>
@@ -45,7 +46,7 @@ The extended attribute syntax for specifying storage-class information uses the
4546

4647
White space separates the declaration modifier sequence. Examples appear in later sections.
4748

48-
Extended attribute grammar supports these Microsoft-specific storage-class attributes: [align](../cpp/align-cpp.md), [allocate](../cpp/allocate.md), [appdomain](../cpp/appdomain.md), [code_seg](../cpp/code-seg-declspec.md), [deprecated](../cpp/deprecated-cpp.md), [dllexport](../cpp/dllexport-dllimport.md), [dllimport](../cpp/dllexport-dllimport.md), [jitintrinsic](../cpp/jitintrinsic.md), [naked](../cpp/naked-cpp.md), [noalias](../cpp/noalias.md), [noinline](../cpp/noinline.md), [noreturn](../cpp/noreturn.md), [nothrow](../cpp/nothrow-cpp.md), [novtable](../cpp/novtable.md), [process](../cpp/process.md), [restrict](../cpp/restrict.md), [safebuffers](../cpp/safebuffers.md), [selectany](../cpp/selectany.md), [spectre](../cpp/spectre.md), and [thread](../cpp/thread.md). It also supports these COM-object attributes: [property](../cpp/property-cpp.md) and [uuid](../cpp/uuid-cpp.md).
49+
Extended attribute grammar supports these Microsoft-specific storage-class attributes: [align](../cpp/align-cpp.md), [allocate](../cpp/allocate.md), [allocator](../cpp/allocator.md), [appdomain](../cpp/appdomain.md), [code_seg](../cpp/code-seg-declspec.md), [deprecated](../cpp/deprecated-cpp.md), [dllexport](../cpp/dllexport-dllimport.md), [dllimport](../cpp/dllexport-dllimport.md), [jitintrinsic](../cpp/jitintrinsic.md), [naked](../cpp/naked-cpp.md), [noalias](../cpp/noalias.md), [noinline](../cpp/noinline.md), [noreturn](../cpp/noreturn.md), [nothrow](../cpp/nothrow-cpp.md), [novtable](../cpp/novtable.md), [process](../cpp/process.md), [restrict](../cpp/restrict.md), [safebuffers](../cpp/safebuffers.md), [selectany](../cpp/selectany.md), [spectre](../cpp/spectre.md), and [thread](../cpp/thread.md). It also supports these COM-object attributes: [property](../cpp/property-cpp.md) and [uuid](../cpp/uuid-cpp.md).
4950

5051
The **code_seg**, **dllexport**, **dllimport**, **naked**, **noalias**, **nothrow**, **property**, **restrict**, **selectany**, **thread**, and **uuid** storage-class attributes are properties only of the declaration of the object or function to which they are applied. The **thread** attribute affects data and objects only. The **naked** and **spectre** attributes affect functions only. The **dllimport** and **dllexport** attributes affect functions, data, and objects. The **property**, **selectany**, and **uuid** attributes affect COM objects.
5152

docs/mfc/reference/cedit-class.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -474,11 +474,11 @@ UINT GetLimitText() const;
474474

475475
### Return Value
476476

477-
The current text limit, in bytes, for this `CEdit` object.
477+
The current text limit, in TCHARs, for this `CEdit` object.
478478

479479
### Remarks
480480

481-
The text limit is the maximum amount of text, in bytes, that the edit control can accept.
481+
The text limit is the maximum amount of text, in TCHARs, that the edit control can accept.
482482

483483
> [!NOTE]
484484
> This member function is available beginning with Windows 95 and Windows NT 4.0.
@@ -510,14 +510,14 @@ int GetLine(
510510
Specifies the line number to retrieve from a multiple-line edit control. Line numbers are zero-based; a value of 0 specifies the first line. This parameter is ignored by a single-line edit control.
511511

512512
*lpszBuffer*<br/>
513-
Points to the buffer that receives a copy of the line. The first word of the buffer must specify the maximum number of characters that can be copied to the buffer.
513+
Points to the buffer that receives a copy of the line. The first word of the buffer must specify the maximum number of TCHARs that can be copied to the buffer.
514514

515515
*nMaxLength*<br/>
516-
Specifies the maximum number of bytes that can be copied to the buffer. `GetLine` places this value in the first word of *lpszBuffer* before making the call to Windows.
516+
Specifies the maximum number of TCHAR characters that can be copied to the buffer. `GetLine` places this value in the first word of *lpszBuffer* before making the call to Windows.
517517

518518
### Return Value
519519

520-
The number of bytes actually copied. The return value is 0 if the line number specified by *nIndex* is greater than the number of lines in the edit control.
520+
The number of characters actually copied. The return value is 0 if the line number specified by *nIndex* is greater than the number of lines in the edit control.
521521

522522
### Remarks
523523

@@ -704,7 +704,7 @@ void LimitText(int nChars = 0);
704704
### Parameters
705705

706706
*nChars*<br/>
707-
Specifies the length (in bytes) of the text that the user can enter. If this parameter is 0, the text length is set to UINT_MAX bytes. This is the default behavior.
707+
Specifies the length (in TCHARs) of the text that the user can enter. If this parameter is 0, the text length is set to UINT_MAX bytes. This is the default behavior.
708708

709709
### Remarks
710710

0 commit comments

Comments
 (0)