Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/Java/Openclaw/extensions/synology-chat/src/   (Openclaw AI Version 22©)  Datei vom 26.3.2026 mit Größe 1 kB image not shown  

Impressum mod.rs   Sprache: Rust

 

use egui::{Color32, Ui};

mod allocation_reports;
mod memory_chunks;

pub(crate) use allocation_reports::*;
pub(crate) use memory_chunks::*;

use crate::allocator::AllocationType;

pub const DEFAULT_COLOR_ALLOCATION_TYPE_FREE: Color32 = Color32::from_rgb(159, 159, 159); // gray
pub const DEFAULT_COLOR_ALLOCATION_TYPE_LINEAR: Color32 = Color32::from_rgb(91, 206, 250); // blue
pub const DEFAULT_COLOR_ALLOCATION_TYPE_NON_LINEAR: Color32 = Color32::from_rgb(250, 169, 184); // pink

#[derive(Clone)]
pub struct ColorScheme {
    pub free_color: Color32,
    pub linear_color: Color32,
    pub non_linear_color: Color32,
}

impl Default for ColorScheme {
    fn default() -> Self {
        Self {
            free_color: DEFAULT_COLOR_ALLOCATION_TYPE_FREE,
            linear_color: DEFAULT_COLOR_ALLOCATION_TYPE_LINEAR,
            non_linear_color: DEFAULT_COLOR_ALLOCATION_TYPE_NON_LINEAR,
        }
    }
}

impl ColorScheme {
    pub(crate) fn get_allocation_type_color(&self, allocation_type: AllocationType) -> Color32 {
        match allocation_type {
            AllocationType::Free => self.free_color,
            AllocationType::Linear => self.linear_color,
            AllocationType::NonLinear => self.non_linear_color,
        }
    }
}

pub(crate) trait SubAllocatorVisualizer {
    fn supports_visualization(&self) -> bool {
        false
    }
    fn draw_base_info(&self, ui: &mut Ui) {
        ui.label("No sub allocator information available");
    }
    fn draw_visualization(
        &self,
        _color_scheme: &ColorScheme,
        _ui: &mut Ui,
        _settings: &MemoryChunksVisualizationSettings,
    ) {
    }
}

Messung V0.5 in Prozent
C=95 H=100 G=97

¤ Dauer der Verarbeitung: 0.8 Sekunden  (vorverarbeitet am  2026-10-03) ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

PVS Prover

Isabelle Prover

NIST Cobol Testsuite

Cephes Mathematical Library

Vienna Development Method

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.