CXS_SEGMENT::GetSize
Beschreibung:
Diese Methode liefert die Segmentgröße in Bytes als STRING. Sollte das Segment nicht initialisiert sein, so wird eine leere Zeichenkette zurückgegeben.
Dieser Aufruf erwartet eine offene Transaktion.
Code-Beispiel:
Var(min, max, minObj, maxObj, cur)
0 -> max
1000000 -> min
BeginTXN
GetManager(OBJECT) Call(GetSegments) iterate {
-> cur
cur Call(GetSize) Integer Dup max >
if { -> max cur -> maxObj }
else { Dup min < if { -> min cur -> minObj } }
}
EndTXN
"Kleinstes Segment: " minObj + " Größe(Bytes):" + min + "\n" +
"Größtes Segment: " + maxObj + " Größe(Bytes):" + max +
Attention
//=> Kleinstes Segment: cs.objectChange (248) Größe(Bytes):512
0 -> max
1000000 -> min
BeginTXN
GetManager(OBJECT) Call(GetSegments) iterate {
-> cur
cur Call(GetSize) Integer Dup max >
if { -> max cur -> maxObj }
else { Dup min < if { -> min cur -> minObj } }
}
EndTXN
"Kleinstes Segment: " minObj + " Größe(Bytes):" + min + "\n" +
"Größtes Segment: " + maxObj + " Größe(Bytes):" + max +
Attention
//=> Kleinstes Segment: cs.objectChange (248) Größe(Bytes):512
// Größtes Segment: dictS (594) Größe(Bytes):36248576
Stack | Position | Objekttyp | Kurzbeschreibung |
---|---|---|---|
Stack(In) | Top | CXS_SEGMENT | Ein Segment |
Stack(Out) | Top | STRING | Segmentgröße |
Funktionsaufruf: Call(GetSize)