GCMemoryInfo Estrutura
Definição
Fornece um conjunto de APIs que podem ser usadas para recuperar informações de coleta de lixo.Provides a set of APIs that can be used to retrieve garbage collection information.
public value class GCMemoryInfo
public struct GCMemoryInfo
type GCMemoryInfo = struct
Public Structure GCMemoryInfo
- Herança
Comentários
Um GC é identificado por seu Index , que começa de 1 e aumenta com cada GC.A GC is identified by its Index, which starts from 1 and increases with each GC. Se você estiver solicitando um GC que não existe, por exemplo, que você chamou o GetGCMemoryInfo método antes de um GC, ou se estiver solicitando um GC de GCKind.FullBlocking e nenhum GCS de bloqueio completo aconteceu, você obterá todos os 0 nas informações, incluindo o Index .If you are asking for a GC that doesn't exist, for example, you called the GetGCMemoryInfo method before a GC happened, or you're asking for a GC of GCKind.FullBlocking and no full blocking GCs have happened, you will get all 0's in the info, including the Index. Você pode usar o índice 0 para detectar que nenhum GC, ou nenhum GC do tipo especificado, ocorreu.You can use index 0 to detect that no GCs, or no GCs of the kind you specified, have occurred.
Propriedades
| Compacted |
Obtém um valor que indica se este é um GC de compactação ou não.Gets a value that indicates if this is a compacting GC or not. |
| Concurrent |
Obtém um valor que indica se este é um GC simultâneo (BGC) ou não.Gets a value that indicates if this is a concurrent GC (BGC) or not. |
| FinalizationPendingCount |
Obtém o número de objetos prontos para finalização que o GC observou.Gets the number of objects that are ready for finalization that this GC observed. |
| FragmentedBytes |
Obtém a fragmentação total durante a última coleta de lixo.Gets the total fragmentation when the last garbage collection occurred. |
| Generation |
Obtém a geração do GC coletado.Gets the generation this GC collected. Coletar uma geração também coletou gerações mais jovens.Collecting a generation also collected younger generations. |
| GenerationInfo |
Obtém as informações de todas as gerações.Gets the generation information for all generations. |
| HeapSizeBytes |
Obtém o tamanho total do heap durante a última coleta de lixo.Gets the total heap size when the last garbage collection occurred. |
| HighMemoryLoadThresholdBytes |
Obtém o limite de carga de memória alta durante a última coleta de lixo.Gets the high memory load threshold when the last garbage collection occurred. |
| Index |
Obtém o índice do GC.Gets the index of this GC. Os índices de GC começam com 1 e aumentam no início de um GC.GC indices start with 1 and are increased at the beginning of a GC. Como as informações são atualizadas no final de um GC, isso significa que você pode obter as informações de um GC de segundo plano com um índice menor do que um GC de primeiro plano concluído anteriormente.Since the information is updated at the end of a GC, this means you can get the information for a background GC with a smaller index than a foreground GC that finished earlier. |
| MemoryLoadBytes |
Obtém a carga de memória durante a última coleta de lixo.Gets the memory load when the last garbage collection occurred. |
| PauseDurations |
Obtém as durações de pausa.Gets the pause durations. Para GCs com bloqueio, há uma pausa; para GC de segundo plano, há duas.For blocking GCs, there is one pause; for background GC, there are two. |
| PauseTimePercentage |
Obtém a porcentagem de tempo de pausa no GC até o momento.Gets the pause time percentage in the GC so far. Se o tempo de pausa for de 1,2%, o valor da propriedade será 1,2.If the pause time is 1.2%, this property's value is 1.2. O valor é calculado por meio da soma de todas as pausas do GC até o momento e dividindo-o pelo tempo total decorrido do processo desde que o runtime foi carregado.The value is calculated by taking the sum of all GC pauses so far and dividing that by the total elapsed time of the process since the runtime was loaded. Este contador em execução é atualizado no final de cada GC.This running counter is updated at the end of each GC. Não faz a distinção entre GCKind.It does not distinguish between GCKind. Ou seja, em cada GC, o valor calculado é atualizado e, quando você acessa essa propriedade, ele obtém o valor calculado mais recente.That is, at every GC, the calculated value is updated, and when you access this property, it gets the latest calculated value. |
| PinnedObjectsCount |
Obtém o número de objetos fixados que o GC observou.Gets the number of pinned objects this GC observed. |
| PromotedBytes |
Obtém os bytes promovidos para o GC.Gets the promoted bytes for this GC. |
| TotalAvailableMemoryBytes |
Obtém a memória total disponível para uso do coletor de lixo durante a última coleta de lixo.Gets the total available memory for the garbage collector to use when the last garbage collection occurred. |
| TotalCommittedBytes |
Obtém o total de bytes confirmados do heap gerenciado.Gets the total committed bytes of the managed heap. |