Skip to content

Commit ea0c31a

Browse files
Taojunshenopbld16TylerMSFTTylerMSFTlaurabren
authored
1/19/2021 AM Publish (MicrosoftDocs#4053)
* github fix 3544 * GITHUB FIX FOR #3549 * Add UWP to list of unsupported ASAN features. * Fix misnamed mt.exe options. Acrolinx all. * Attempt fpcvt simplification per John Morgan. * Fix cpp-docs 3546 * Address complaint in cpp-docs 3554 (#3950) * Add section on CMake partial activation * 17.1 Update warnings, fix cpp-docs 3563 (#3954) * 17.1 Update warnings, fix cpp-docs 3563 * fix date * Add `/Zc:externC` compiler option doc, fix 1594 * Tweaks. * Fix links, header syntax issues * Fix issues in XML Docs reference * Make list match apparently intended style * Fix broken link. * Add docs for new check Signed-off-by: Kyle Reed <[email protected]> * fix toc * remove .md from toc title * Revert "Add docs for new linter check" * update runtime spelling * Bulk fix: remove HTML entities from yml headers (MicrosoftDocs#3962) * Style and content fixes in cpp language docs * Changing confusing wording about C++ exceptions * Bulk fix HTML entities in H1 (MicrosoftDocs#3966) * Fix lt-gt entity pairs * Bulk fix of `&lt;`-`&gt;` pairs in H1 headings * Oops, deleted initial `#` * Fix two more H1 issues * update with existing .openpublishing.publish.config.json * C++ tutorial landing page, attempt 2 * Revert redirection of get-started index.yml file * Fix typo * Bulk fix `&lt;`, `&gt;`, and `.period;` entities * operatoroperator * `/hotpatch`: No jump to the first instruction * Update Acrolinx for main branch * Change learn about item type * Add get started TOC * fix over machine translation problems (MicrosoftDocs#3977) * fix over machine translation problems * acrolinx and misses * markdown fixes Co-authored-by: TylerMSFT <[email protected]> * Make the grammar bot happy * Fix things that look like parameters. (#3978) * Fix things that look like parameters. * Acrolinxy * Misc fixes * Other fixes * Fix typos * Acrolinx some more * [17.0] Update links to download Visual Studio (MicrosoftDocs#3981) * Update links to download Visual Studio * Remove VS 2019 reference * Address cpp-docs 3565 * Also cpp-docs 439 * cpp-docs 947 * cpp-docs 1002 * accuratized * cpp-docs 1035 * Twhitney named modules (#3960) * draft * draft * draft * fix links * cleanup * added some more info * add some see also references * cleanup pass * remove text about overloads * tech review * little better wording * a little more word smithing * fix link * acrolinx * readthrough pass * Readthrough to test building the project * acrolinx * rename media file Co-authored-by: TylerMSFT <[email protected]> * cpp-docs 1305 * cpp-docs 1324 * address github issue #3524 and add code escape to prevent over machine translation * missed a couple escapes * couple more code escapes * one more escape * Address cpp-docs 3583: LNK1107 clarity * Tweaks * tweak formatting * Expand on fix for cpp-docs 1035 (#3986) * Expand of fix for cpp-docs 1035 * Mention overloads. * Grammar and formatting fixes * add summary of what will learn in module * [17.1p2] Add docs for comparison/bitwise c++ linter check. (MicrosoftDocs#3964) * Revert "Revert "Add docs for new linter check"" This reverts commit e56971f. * PR feedback Signed-off-by: Kyle Reed <[email protected]> * Update cmake-presets-vs.md * Update cmake-presets-vs.md * Switch http to https and fix broken links * Acrolinx * Style pass for the grammar checker bot * Fix two incorrect conditions in the ARM packed exception handling For the prologue, the distinction between `mov r11, sp` and `add r11, sp, #xx` lies only in whether other registers are pushed before R11 and LR in prologue instruction 2. (The condition `R`==1 and `PF`==0 corresponds to no other registers pushed before `r11`.) The `L` flag doesn't affect it (and the documentation explicit says that when `C` is set, then `L` also must be set, thus `C`==1 and `L`==0 is tautological too). This was correctly described in the textual form, but the conditions in the table included one erronous case. For the epilogue, when `Ret`!=0, the function doesn't return by popping LR directly into PC, but with an explicit branch instruction (10a or 10b). In this case, if `L`==1, the LR register is included in the list of registers popped in instruction 8. If register homing is used (`H`==1), then instruction 9a is used instead of 9b. This case seemed to have been overlooked both in the textual description and in the table. Also, when prologue instruction form 3a is used, clarify that it corresponds to the unwind code FB (narrow nop) only, that unwinding such a prologue doesn't restore `sp` from `r11`. Also fix a typo and clarify that encodings with C=1, L=0 are invalid. * Address cpp-docs 3588 error in link commands (#3996) * Address cpp-docs 3588 error in link commands * Update ms.date * Acrolinx fixes to frontrun cpp-docs 3541 * Post-3541 acrolinx pass * Update how-to-marshal-structures-using-cpp-interop.md Change "=" into "-" * Add _CountOneBits[64] to the ARM64 intrinsic doc * Update .acrolinx-config.edn update to reflect default branch name change * Mark first code block as C++ Syntax highlighting did not work for the `using identifier = type;` block due to missing language information. * Fixed grammatical error in allocator-class.md "Constructing a container with a custom allocator provide control over allocation and freeing of that container's elements." -> "Constructing a container with a custom allocator provides control over allocation and freeing of that container's elements." * Update d-using-the-schedule-clause.md * Correct a word in the remarks of /DIRECTIVES. The section is .drectve instead of .drective. * std::is_standard_layout<Derived> * Make meaning clearer This makes the meaning clearer to me. The ". Or," seems like to strong of a separator for closely related phrases. * Update value-types-modern-cpp.md Commas to make the meaning clearer * add missing usage of CopyChars * update json examples (#4017) * update json examples * acrolinx Co-authored-by: TylerMSFT <[email protected]> * fix github issue #3600 * formatting cleanup and acrolinx * Address cpp-docs issues 3601 3622 3626 * Update deprecating-types-and-members-c-cx.md * PR review edit / relative link syntax * add code escape to prevent overtranslation * fix missed code elements and acrolinx * more cleanup * github fixes for #3635 and #3636 (MicrosoftDocs#4026) * github fixes for #3635 and #3636 * acrolinx and cleanup * nit Co-authored-by: TylerMSFT <[email protected]> * Update windows-store-apps-the-windows-runtime-and-the-c-run-time.md * Broken link fixed (MicrosoftDocs#4025) * Implement intrinics broken link fixes (MicrosoftDocs#4028) * Update deprecating-types-and-members-c-cx.md Add code formatting to links to prevent overlocalization and markdown processing issues. * Update windows-store-apps-the-windows-runtime-and-the-c-run-time.md * Follow-up cpp-docs 3637 for style and Acrolinx * [17.0] Add compiler option `/option:strict` (MicrosoftDocs#4002) * edit pass (#4035) * edit pass * acrolinx * acrolinx * minor edits Co-authored-by: TylerMSFT <[email protected]> * Fix non-blocking issues identified in MicrosoftDocs#4032 * Correct & complete REP* keywords in Prefix table * US1907300 - add md code escapes to code elements * updates after review * Update CComHeap for style, Acrolinx issue (MicrosoftDocs#3963) Co-authored-by: opbld16 <[email protected]> Co-authored-by: TylerMSFT <[email protected]> Co-authored-by: Tyler Whitney <[email protected]> Co-authored-by: Laura Brenner <[email protected]> Co-authored-by: opbld17 <[email protected]> Co-authored-by: Colin Robertson <[email protected]> Co-authored-by: branh <[email protected]> Co-authored-by: John Ellison <[email protected]> Co-authored-by: PRMerger8 <[email protected]> Co-authored-by: PRMerger17 <[email protected]> Co-authored-by: Sam Freed <[email protected]> Co-authored-by: opbld15 <[email protected]> Co-authored-by: Colin Cooper <[email protected]> Co-authored-by: Paula Miller <[email protected]> Co-authored-by: Kyle Reed <[email protected]> Co-authored-by: Hannes Harnisch <[email protected]> Co-authored-by: Anna Huff <[email protected]> Co-authored-by: Ying Hua <[email protected]> Co-authored-by: Alex Guteniev <[email protected]> Co-authored-by: Dennis Rea <[email protected]> Co-authored-by: PRMerger3 <[email protected]> Co-authored-by: PRMerger18 <[email protected]> Co-authored-by: PRMerger Service account 2 <[email protected]> Co-authored-by: Jonathan Sweemer <[email protected]> Co-authored-by: Martin Storsjö <[email protected]> Co-authored-by: Kristine Toliver <[email protected]> Co-authored-by: AndreaLu <[email protected]> Co-authored-by: Matt Gardner <[email protected]> Co-authored-by: Sarah Vilaysom <[email protected]> Co-authored-by: Matthias <[email protected]> Co-authored-by: James Oswald <[email protected]> Co-authored-by: Anton Curmanschii <[email protected]> Co-authored-by: ROOOO <[email protected]> Co-authored-by: luozhiya <[email protected]> Co-authored-by: Zane Hitchcox <[email protected]> Co-authored-by: Chris Ho <[email protected]> Co-authored-by: Haig MacGregor <[email protected]> Co-authored-by: PRMerger5 <[email protected]> Co-authored-by: Jaiganesh Kumaran <[email protected]> Co-authored-by: Jak Koke <[email protected]> Co-authored-by: atikmapari <[email protected]> Co-authored-by: Linda Spiller <[email protected]> Co-authored-by: tjs137 <[email protected]> Co-authored-by: Craig Casey <[email protected]>
1 parent 397fe37 commit ea0c31a

File tree

1 file changed

+36
-36
lines changed

1 file changed

+36
-36
lines changed

docs/atl/reference/ccomheap-class.md

Lines changed: 36 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -6,39 +6,39 @@ f1_keywords: ["CComHeap", "ATLCOMMEM/ATL::CComHeap", "ATLCOMMEM/ATL::CComHeap::A
66
helpviewer_keywords: ["CComHeap class"]
77
ms.assetid: c74183ce-98ae-46fb-b186-93ea4cf0222b
88
---
9-
# CComHeap Class
9+
# `CComHeap` Class
1010

11-
This class implements [IAtlMemMgr](../../atl/reference/iatlmemmgr-class.md) using the COM memory allocation functions.
11+
This class implements [`IAtlMemMgr`](../../atl/reference/iatlmemmgr-class.md) using the COM memory allocation functions.
1212

1313
> [!IMPORTANT]
1414
> This class and its members cannot be used in applications that execute in the Windows Runtime.
1515
1616
## Syntax
1717

18-
```
18+
```cpp
1919
class CComHeap : public IAtlMemMgr
2020
```
2121
2222
## Members
2323
24-
### Public Methods
24+
### Public methods
2525
2626
|Name|Description|
2727
|----------|-----------------|
28-
|[CComHeap::Allocate](#allocate)|Call this method to allocate a block of memory.|
29-
|[CComHeap::Free](#free)|Call this method to free a block of memory allocated by this memory manager.|
30-
|[CComHeap::GetSize](#getsize)|Call this method to get the allocated size of a memory block allocated by this memory manager.|
31-
|[CComHeap::Reallocate](#reallocate)|Call this method to reallocate memory allocated by this memory manager.|
28+
|[`CComHeap::Allocate`](#allocate)|Call this method to allocate a block of memory.|
29+
|[`CComHeap::Free`](#free)|Call this method to free a block of memory allocated by this memory manager.|
30+
|[`CComHeap::GetSize`](#getsize)|Call this method to get the allocated size of a memory block allocated by this memory manager.|
31+
|[`CComHeap::Reallocate`](#reallocate)|Call this method to reallocate memory allocated by this memory manager.|
3232
3333
## Remarks
3434
35-
`CComHeap` implements memory allocation functions using the COM allocation functions, including [CoTaskMemAlloc](/windows/win32/api/combaseapi/nf-combaseapi-cotaskmemalloc), [CoTaskMemFree](/windows/win32/api/combaseapi/nf-combaseapi-cotaskmemfree), [IMalloc::GetSize](/windows/win32/api/objidlbase/nf-objidlbase-imalloc-getsize), and [CoTaskMemRealloc](/windows/win32/api/combaseapi/nf-combaseapi-cotaskmemrealloc). The maximum amount of memory that can be allocated is equal to INT_MAX (2147483647) bytes.
35+
`CComHeap` implements memory allocation functions using the COM allocation functions, including [`CoTaskMemAlloc`](/windows/win32/api/combaseapi/nf-combaseapi-cotaskmemalloc), [`CoTaskMemFree`](/windows/win32/api/combaseapi/nf-combaseapi-cotaskmemfree), [`IMalloc::GetSize`](/windows/win32/api/objidlbase/nf-objidlbase-imalloc-getsize), and [`CoTaskMemRealloc`](/windows/win32/api/combaseapi/nf-combaseapi-cotaskmemrealloc). The maximum amount of memory that can be allocated is equal to `INT_MAX` (2147483647) bytes.
3636
3737
## Example
3838
39-
See the example for [IAtlMemMgr](../../atl/reference/iatlmemmgr-class.md).
39+
See the example for [`IAtlMemMgr`](../../atl/reference/iatlmemmgr-class.md).
4040
41-
## Inheritance Hierarchy
41+
## Inheritance hierarchy
4242
4343
`IAtlMemMgr`
4444
@@ -52,95 +52,95 @@ See the example for [IAtlMemMgr](../../atl/reference/iatlmemmgr-class.md).
5252
5353
Call this method to allocate a block of memory.
5454
55-
```
55+
```cpp
5656
virtual __declspec(allocator) void* Allocate(size_t nBytes) throw();
5757
```
5858

5959
### Parameters
6060

61-
*nBytes*<br/>
61+
*`nBytes`*\
6262
The requested number of bytes in the new memory block.
6363

64-
### Return Value
64+
### Return value
6565

6666
Returns a pointer to the start of the newly allocated memory block.
6767

6868
### Remarks
6969

70-
Call [CComHeap::Free](#free) or [CComHeap::Reallocate](#reallocate) to free the memory allocated by this method.
70+
Call [`CComHeap::Free`](#free) or [`CComHeap::Reallocate`](#reallocate) to free the memory allocated by this method.
7171

72-
Implemented using [CoTaskMemAlloc](/windows/win32/api/combaseapi/nf-combaseapi-cotaskmemalloc).
72+
Implemented using [`CoTaskMemAlloc`](/windows/win32/api/combaseapi/nf-combaseapi-cotaskmemalloc).
7373

7474
## <a name="free"></a> CComHeap::Free
7575

7676
Call this method to free a block of memory allocated by this memory manager.
7777

78-
```
78+
```cpp
7979
virtual void Free(void* p) throw();
8080
```
8181
8282
### Parameters
8383
84-
*p*<br/>
84+
*`p`*\
8585
Pointer to memory previously allocated by this memory manager. NULL is a valid value and does nothing.
8686
8787
### Remarks
8888
89-
Implemented using [CoTaskMemFree](/windows/win32/api/combaseapi/nf-combaseapi-cotaskmemfree).
89+
Implemented using [`CoTaskMemFree`](/windows/win32/api/combaseapi/nf-combaseapi-cotaskmemfree).
9090
9191
## <a name="getsize"></a> CComHeap::GetSize
9292
9393
Call this method to get the allocated size of a memory block allocated by this memory manager.
9494
95-
```
95+
```cpp
9696
virtual size_t GetSize(void* p) throw();
9797
```
9898

9999
### Parameters
100100

101-
*p*<br/>
101+
*`p`*\
102102
Pointer to memory previously allocated by this memory manager.
103103

104-
### Return Value
104+
### Return value
105105

106106
Returns the size of the allocated memory block in bytes.
107107

108108
### Remarks
109109

110-
Implemented using [IMalloc::GetSize](/windows/win32/api/objidlbase/nf-objidlbase-imalloc-getsize).
110+
Implemented using [`IMalloc::GetSize`](/windows/win32/api/objidlbase/nf-objidlbase-imalloc-getsize).
111111

112112
## <a name="reallocate"></a> CComHeap::Reallocate
113113

114114
Call this method to reallocate memory allocated by this memory manager.
115115

116-
```
116+
```cpp
117117
virtual __declspec(allocator) void* Reallocate(void* p, size_t nBytes) throw();
118118
```
119119
120120
### Parameters
121121
122-
*p*<br/>
122+
*`p`*\
123123
Pointer to memory previously allocated by this memory manager.
124124
125-
*nBytes*<br/>
125+
*`nBytes`*\
126126
The requested number of bytes in the new memory block.
127127
128-
### Return Value
128+
### Return value
129129
130130
Returns a pointer to the start of the newly allocated memory block.
131131
132132
### Remarks
133133
134-
Call [CComHeap::Free](#free) to free the memory allocated by this method.
134+
Call [`CComHeap::Free`](#free) to free the memory allocated by this method.
135135
136-
Implemented using [CoTaskMemRealloc](/windows/win32/api/combaseapi/nf-combaseapi-cotaskmemrealloc).
136+
Implemented using [`CoTaskMemRealloc`](/windows/win32/api/combaseapi/nf-combaseapi-cotaskmemrealloc).
137137
138138
## See also
139139
140-
[DynamicConsumer Sample](../../overview/visual-cpp-samples.md)<br/>
141-
[Class Overview](../../atl/atl-class-overview.md)<br/>
142-
[CWin32Heap Class](../../atl/reference/cwin32heap-class.md)<br/>
143-
[CLocalHeap Class](../../atl/reference/clocalheap-class.md)<br/>
144-
[CGlobalHeap Class](../../atl/reference/cglobalheap-class.md)<br/>
145-
[CCRTHeap Class](../../atl/reference/ccrtheap-class.md)<br/>
146-
[IAtlMemMgr Class](../../atl/reference/iatlmemmgr-class.md)
140+
[DynamicConsumer Sample](../../overview/visual-cpp-samples.md)\
141+
[Class Overview](../../atl/atl-class-overview.md)\
142+
[`CWin32Heap` Class](../../atl/reference/cwin32heap-class.md)\
143+
[`CLocalHeap` Class](../../atl/reference/clocalheap-class.md)\
144+
[`CGlobalHeap` Class](../../atl/reference/cglobalheap-class.md)\
145+
[`CCRTHeap` Class](../../atl/reference/ccrtheap-class.md)\
146+
[`IAtlMemMgr` Class](../../atl/reference/iatlmemmgr-class.md)

0 commit comments

Comments
 (0)