From f4d2fa3fb2f41a0231040f7e005c4bd467855620 Mon Sep 17 00:00:00 2001 From: Taylan Kammer Date: Sat, 14 Nov 2026 16:48:21 +0100 Subject: s/zisp/xisp/g on notes --- notes/260923-green-tea.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'notes/260923-green-tea.md') diff --git a/notes/260923-green-tea.md b/notes/260923-green-tea.md index b8d3646..32fc799 100644 --- a/notes/260923-green-tea.md +++ b/notes/260923-green-tea.md @@ -11,19 +11,19 @@ GC design I have in mind, but realized it won't work for two reasons: so it can mark individual memory slots that may contain pointers. My bitmaps are more specialized, and only mark the position of an object of a certain size class within a Meta Alloc slab; this cuts - down bitmap memory use substantially. Besides, Zisp object fields + down bitmap memory use substantially. Besides, Xisp object fields may contain NaN-packed pointers as well as raw pointers, or other representations of an object address, so I really need "layout" information when scanning a heap object's memory. -2. Zisp heap objects don't have a fully generic object header telling +2. Xisp heap objects don't have a fully generic object header telling you what type it is / what the memory layout of the object on the heap is. Some types have a specific header format, like an array header encoding its length among other things, but the NaN-packed pointer to an object may already contain all its metadata, such that there's no metadata whatsoever on the heap. -So, unlike in Green Tea, the mark phase of the Zisp GC cannot simply +So, unlike in Green Tea, the mark phase of the Xisp GC cannot simply push memory spans onto the work stack. It has to push work objects that consist of the object's address and type. @@ -86,7 +86,7 @@ use all possible 8-bit values for the regular heap type tag; we can reserve two for the special types that use another 8 bits for their length, and another one to mean "invalid.") -If Zisp supports fully static typing one day, such that every single +If Xisp supports fully static typing one day, such that every single user-defined heap type needs a static type ID that the GC knows of, then we could use 32 or 64 bits instead, doubling or quadrupling the Work Table size in terms of memory use (but not entry count). @@ -226,7 +226,7 @@ However, it seems extremely unlikely that this would actually happen, given that the work-set of a tracing GC typically contains a small fraction of the live object graph at any given moment. -Still, imagine a humongous array of heterogeneous Zisp values, say a +Still, imagine a humongous array of heterogeneous Xisp values, say a billion, and every single one happens to point to an 8-byte object. That's about half of all 8-byte objects that can be allocated (the limit is exactly 2 Gi since a slab is 16 GiB) so when the GC traces @@ -235,11 +235,11 @@ this array it would really use a substantial portion of a slab. Honestly, the short answer to this problem is: Don't do that, then. Just to put things in perspective: A billion 64-bit values (which is -what a heterogeneous Zisp array is) consumes 8 GiB of RAM. If you're +what a heterogeneous Xisp array is) consumes 8 GiB of RAM. If you're wondering where in Meta Alloc that would even fit: Nowhere, since the Block Alloc / GC Alloc strategy will be to allocate any object beyond 256 KiB outside the Meta Alloc heap, and represent it with a handle. -So it *could* exist in Zisp, but if you're using 8 GiB just for that +So it *could* exist in Xisp, but if you're using 8 GiB just for that array, and another 8 GiB for the billion 8-byte objects it will hold, then hopefully your heap contains almost nothing else, and the GC can use a large portion of the 256 KiB or 512 KiB slab? -- cgit v1.2.3