<< lib/math/examples/BigArrayGCVerify.sleela SLeeLa Standard Library Definition. Definition: Regression guard for the incremental-GC allocate-black fix. It allocates two large int[] arrays and fills them in a long loop, which forces a garbage-collection cycle to run WHILE a second large array is being allocated and populated. Before the fix, an object allocated during the GC's marking phase was not on that cycle's root snapshot and was swept as garbage even though it was a live local -- surfacing as "index assignment on a non-array value" partway through the fill. This program must run to completion and report the expected last elements. >> #sleela 2.5 material; class BigArrayGCVerify { < ---- Descriptive metadata (version 1.11 nested-friendly accessors) ---- > << Baseline identity for a worker-class example. >> String metaVersion = "1.0.0"; int metaId = 7907; String metaAuthor = "Max Rupplin"; String metaDate = "2026-11-06"; String metaCopyright = "MEARVK LLC"; String metaTrademark = "none"; String metaCorporation = "MEARVK LLC"; String metaOrigin = "International"; String metaBirthDate = "2026-11-06"; int metaScienceRating = 7; String metaNationalSchedule = "none"; String getMetaVersion() { return metaVersion; } void setMetaVersion(String v) { metaVersion = v; } int getMetaId() { return metaId; } void setMetaId(int v) { metaId = v; } String getAuthor() { return metaAuthor; } void setAuthor(String v) { metaAuthor = v; } String getDate() { return metaDate; } void setDate(String v) { metaDate = v; } String getCopyright() { return metaCopyright; } void setCopyright(String v) { metaCopyright = v; } String getTrademark() { return metaTrademark; } void setTrademark(String v) { metaTrademark = v; } String getCorporation() { return metaCorporation; } void setCorporation(String v) { metaCorporation = v; } String getOrigin() { return metaOrigin; } void setOrigin(String v) { metaOrigin = v; } String getBirthDate() { return metaBirthDate; } void setBirthDate(String v) { metaBirthDate = v; } int getScienceRating() { return metaScienceRating; } void setScienceRating(int v) { metaScienceRating = v; } String getNationalSchedule() { return metaNationalSchedule; } void setNationalSchedule(String v) { metaNationalSchedule = v; } void main() { print("GC allocate-black regression: two large arrays across a collection"); int n = 400000; int[] a = new int[n]; int[] b = new int[n]; int i = 0; while (i < n) { a[i] = i; b[i] = n - i; i = i + 1; } int last = n - 1; boolean ok = a[0] == 0 && a[last] == last && b[0] == n && b[last] == 1; if (ok) { print("RESULT: PASS - both arrays survived the collection intact"); } else { print("RESULT: FAIL - an array was corrupted or reclaimed"); } } }