IsLarge() was reading the small-header Flags field at offset Ptr-4, but TLargeHeader laid its AllocSize: Int64 across Ptr-8..Ptr-1, so the Flags probe overlapped with the high half of AllocSize and was always zero. Every large block therefore routed through the small free path and the LIFO cache was never populated, forcing a fresh mmap on each large allocation. Restructured TLargeHeader to: TotalMapped: Int64 (Ptr-16..Ptr-9) AllocSize: Integer (Ptr-8..Ptr-5) Flags: Integer (Ptr-4..Ptr-1) LargeGetMem now writes Flags := FLAG_LARGE, IsLarge() returns the correct value, and the cache reaches ~100% hit rate on the large alloc/free workload (32 ms -> 0 ms for 10k x 64KB). Also adds the two benchmark programs (bench_blaise_mem.pas for the malloc baseline and bench_blaise_mem_custom.pas for blaise_mem) and reformats docs/benchmark.txt as a dated log so future runs can be tracked over time. |
||
|---|---|---|
| .. | ||
| benchmark.txt | ||
| design.adoc | ||
| future-improvements.adoc | ||
| grammar.ebnf | ||
| language-rationale.adoc | ||
| testing-strategy.adoc | ||