dotnet / dotnet/dotnet-api-docs
How to allocate 2 or more GB ?
- Lingua principale
- C#
- Stelle
- 949
- Fork
- 1.7k
- Merge medio
- 3g 27m
- PR unite (30g)
- 49
Descrizione
The size parameter to the allocation is defined as an int. This precludes allocations of 2 or more GB in a single call. At the very least, the 'int cb' should have been a 'uint cb'.
I would also argue that in 64-bit addressing it should be a long (or a ulong)... welcome to the 64-bit world.
---
#### Document Details
⚠ *Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.*
* ID: ec1aaf4e-d08b-7d7b-a2bb-6e5cdbba5552
* Version Independent ID: 62bc5f30-97ac-bc21-47e2-7c4faffe602e
* Content: [Marshal.AllocCoTaskMem(Int32) Method (System.Runtime.InteropServices)](https://docs.microsoft.com/en-us/dotnet/api/system.runtime.interopservices.marshal.alloccotaskmem?view=netframework-4.7.2)
* Content Source: [xml/System.Runtime.InteropServices/Marshal.xml](https://github.com/dotnet/dotnet-api-docs/blob/master/xml/System.Runtime.InteropServices/Marshal.xml)
* Product: **dotnet-api**
* GitHub Login: @dotnet-bot
* Microsoft Alias: **dotnetcontent**
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Start with xml/System.Runtime.InteropServices/Marshal.xml and the linked Marshal.AllocCoTaskMem(Int32) reference page. Verify whether the reported Int32 limitation is a documentation discrepancy or an API design request, and check the repository's guidance for API reference changes. Done means the documentation accurately reflects the supported API or the issue is routed as an API change request.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- csharp
- Ambito
- documentation
- Tipo di issue
- Documentazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Da chiarire
- Idoneità per principianti
- 30/100