Chiyoko_S
Chiyoko_S
CC#
Created by Ewan on 2/29/2024 in #help
why is the virtual page number 165 and the pageset is 47??
which when converted to decimal is 165 and 47
8 replies
CC#
Created by Ewan on 2/29/2024 in #help
why is the virtual page number 165 and the pageset is 47??
so 0x000A5 (first 20 bits) is the page number, and 0x02F is the offset
8 replies
CC#
Created by Ewan on 2/29/2024 in #help
why is the virtual page number 165 and the pageset is 47??
the purple (gray?) part is the offset within the said page
8 replies
CC#
Created by Ewan on 2/29/2024 in #help
why is the virtual page number 165 and the pageset is 47??
in that image the green part represents the page number
8 replies
CC#
Created by Ewan on 2/29/2024 in #help
why is the virtual page number 165 and the pageset is 47??
and the remaining 20 is used as a page number
8 replies
CC#
Created by Ewan on 2/29/2024 in #help
why is the virtual page number 165 and the pageset is 47??
in this case the size of the page is 4 kilobytes, which needs 12 bits to represent fully
8 replies
CC#
Created by Ewan on 2/29/2024 in #help
why is the virtual page number 165 and the pageset is 47??
with paging, the address value can be thought of as two separate values, one being the page id and other being the address within that page (offset)
8 replies
CC#
Created by 항암제 on 1/30/2024 in #help
Garbage Collection Questions
(on windows that would be, at least)
22 replies
CC#
Created by 항암제 on 1/30/2024 in #help
Garbage Collection Questions
it is obtained from the OS with VirtualAlloc
22 replies
CC#
Created by 항암제 on 1/30/2024 in #help
Garbage Collection Questions
this is there mostly because compaction can take a long time when the object is huge
22 replies
CC#
Created by 항암제 on 1/30/2024 in #help
Garbage Collection Questions
I believe it is an implementation detail but currently the cutoff for LOH is 85000 bytes or something
22 replies
CC#
Created by 항암제 on 1/30/2024 in #help
Garbage Collection Questions
as mentioned above there's also a thing called 'large object heap' which is where... large objects go
22 replies
CC#
Created by 항암제 on 1/30/2024 in #help
Garbage Collection Questions
there also would be compaction to reduce fragmentation
22 replies
CC#
Created by 항암제 on 1/30/2024 in #help
Garbage Collection Questions
I'm not too sure about how it allocates segments and move data around but from my understanding it is dynamic - as in, there is no fixed "gen 1 segment" and "gen 0 segment" from the beginning, but rather, as the GC requests new segments from the OS it would start out as a gen0 segment but as the objects contained in the segments gets promoted or collected it turns it into a Gen1/2 segment
22 replies
CC#
Created by 항암제 on 1/30/2024 in #help
Garbage Collection Questions
if it even survives a Gen1 collection then it gets promoted to Gen2 (which in .NET is the final one)
22 replies
CC#
Created by 항암제 on 1/30/2024 in #help
Garbage Collection Questions
then, once an object survives a Gen0 collection, it is promoted to Gen1, where it is less likely to be subject to GC passes (i.e., less pointless scannings)
22 replies
CC#
Created by 항암제 on 1/30/2024 in #help
Garbage Collection Questions
Gen0 collections are much more frequent because of the reason said above
22 replies
CC#
Created by 항암제 on 1/30/2024 in #help
Garbage Collection Questions
so when objects get created, they are considered a generation 0 object
22 replies
CC#
Created by 항암제 on 1/30/2024 in #help
Garbage Collection Questions
The basic assumption is that most of the allocations would be short lived (e.g. string that gets discarded immediately after use) and long lived objects are likely to live for the whole duration of the app (e.g. static data that gets initialised during startup). With that assumption, it would be much more profitable to focus on collecting newly created objects rather than analysing everything (since GC itself comes with the cost of running the thing in the CPU)
22 replies
CC#
Created by Bored Student on 1/26/2024 in #help
Neat String interpolation
yeah, not really what you asked for but it is a great lib if you write a lot of CLI stuffs :D
16 replies