Paging manual memory in .Net Framework (is this possible / How?)

I have a great interest in writing a database management system. After reading a few pages about how SQL Server 2000 was implemented, I found that 4 KB pages are used, each of which is a direct copy of the 4 KB page on the hard drive. These pages were loaded into RAM as needed, and then lazily written back to disk when they fell idle (simplification).

Being at the planning stage of my project, I wonder if this level of control is possible in code running on the CLR. I understand that C, C ++, or D are probably better suited for this task, but I would like to prove it to myself first. Part of the motivation for this is that in the end I want to actually override the CLR garbage collector with my own, using my database as a bunch, at least for relatively obsolete objects.

Is it possible to directly manage memory from the CLR? If so, how would I do it?

Suppose now that my data is a group of 256-byte structures / classes stored in a flat table on disk, and I am using 64 KB pages.

+4
source share
1 answer

Grade. You can use memory mapped files in .NET, so writing to "memory" is actually written to disk.

+2
source

Source: https://habr.com/ru/post/1433695/


All Articles