<elemento de > gcAllowVeryLargeObjects<gcAllowVeryLargeObjects> Element
Em plataformas de 64 bits, habilita matrizes com mais de 2 gigabytes (GB) de tamanho total.On 64-bit platforms, enables arrays that are greater than 2 gigabytes (GB) in total size.
<configuration> <configuration>
<runtime > <runtime>
<gcAllowVeryLargeObjects > <gcAllowVeryLargeObjects>
SintaxeSyntax
<gcAllowVeryLargeObjects
enabled="true|false" />
Atributos e elementosAttributes and Elements
As seções a seguir descrevem atributos, elementos filho e elementos pai.The following sections describe attributes, child elements, and parent elements.
AtributosAttributes
AtributoAttribute | DescriçãoDescription |
---|---|
enabled |
Atributo obrigatório.Required attribute. Especifica se as matrizes maiores que 2 GB no tamanho total estão habilitadas em plataformas de 64 bits.Specifies whether arrays that are greater than 2 GB in total size are enabled on 64-bit platforms. |
Atributo habilitadoenabled Attribute
ValorValue | DescriçãoDescription |
---|---|
false |
Matrizes maiores que 2 GB no tamanho total não estão habilitadas.Arrays greater than 2 GB in total size are not enabled. Esse é o padrão.This is the default. |
true |
Matrizes maiores que 2 GB no tamanho total são habilitadas em plataformas de 64 bits.Arrays greater than 2 GB in total size are enabled on 64-bit platforms. |
Elementos filhoChild Elements
nenhuma.None.
Elementos paiParent Elements
ElementoElement | DescriçãoDescription |
---|---|
configuration |
O elemento raiz em cada arquivo de configuração usado pelos aplicativos do Common Language Runtime e .NET Framework.The root element in every configuration file used by the common language runtime and .NET Framework applications. |
runtime |
Contém informações sobre opções de inicialização do runtime.Contains information about runtime initialization options. |
ComentáriosRemarks
O uso desse elemento em seu arquivo de configuração de aplicativo permite que matrizes com mais de 2 GB de tamanho, mas não alteram outros limites no tamanho do objeto ou tamanho da matriz:Using this element in your application configuration file enables arrays that are larger than 2 GB in size, but does not change other limits on object size or array size:
O número máximo de elementos em uma matriz é UInt32.MaxValue.The maximum number of elements in an array is UInt32.MaxValue.
O índice máximo em qualquer dimensão única é 2.147.483.591 (0x7FFFFFC7) para matrizes de bytes e matrizes de estruturas de byte único e 2.146.435.071 (0X7FEFFFFF) para outros tipos.The maximum index in any single dimension is 2,147,483,591 (0x7FFFFFC7) for byte arrays and arrays of single-byte structures, and 2,146,435,071 (0X7FEFFFFF) for other types.
O tamanho máximo para cadeias de caracteres e outros objetos que não são da matriz não são alterados.The maximum size for strings and other non-array objects is unchanged.
Cuidado
Antes de habilitar esse recurso, verifique se o seu aplicativo não inclui um código não seguro que assuma que todas as matrizes tenham menos de 2 GB de tamanho.Before enabling this feature, ensure that your application does not include unsafe code that assumes that all arrays are smaller than 2 GB in size. Por exemplo, o código não seguro que usa matrizes como buffers pode ser suscetível a estouros de buffer se ele for escrito na suposição de que as matrizes não excederão 2 GB.For example, unsafe code that uses arrays as buffers might be susceptible to buffer overruns if it is written on the assumption that arrays will not exceed 2 GB.
ExemploExample
O exemplo a seguir mostra como habilitar esse recurso para um aplicativo.The following example shows how to enable this feature for an application.
<configuration>
<runtime>
<gcAllowVeryLargeObjects enabled="true" />
</runtime>
</configuration>
Com suporte emSupported in
.NET Framework 4,5 e versões posteriores.NET Framework 4.5 and later versions
Consulte tambémSee also
Comentários
Carregando comentários...