dotnet / dotnet/dotnet-api-docs

How to allocate 2 or more GB ?

Offen
#892 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
area-System.Runtime.InteropServices dotnet-api/prod Pri2 untriaged
Vorherrschende Sprache
C#
Sterne
949
Forks
1.7k
Ø Merge
2 T. 19 Std.
Gemergte PRs (30 T.)
52

Beschreibung

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**

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

Beginne mit xml/System.Runtime.InteropServices/Marshal.xml und der verknüpften Referenzseite zu Marshal.AllocCoTaskMem(Int32). Überprüfe, ob die gemeldete Int32-Einschränkung eine Dokumentationsabweichung oder eine Anfrage zur API-Gestaltung ist, und prüfe die Richtlinien des Repositorys für Änderungen an API-Referenzen. Als erledigt gilt die Aufgabe, wenn die Dokumentation die unterstützte API korrekt wiedergibt oder das Issue als Anfrage zur API-Änderung weitergeleitet wurde.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
csharp
Bereich
documentation
Issue-Typ
Dokumentation
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Veraltet
Klarheit
Muss geklärt werden
Anfängerfreundlichkeit
30/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.