Hacker News new | ask | show | jobs
by nikcub 5179 days ago
What the hell? 2^32 = 4,096MB. by default it is split 50/50. there are boot switches in windows to make it 3/1 or 4/0 (or PAE)

i'd love to hear more about this awesome 32-bit operating system you seem to know about that defies the laws of math.

1 comments

While this is a correct observation, the one about 512Mb contiguous memory being fragmented that early is not really the most clever construction of an operating system I have seen.

It argues that while you can get 2Gb (or 3Gb, ...) you cannot get a contiguous space larger than X megabytes.

That said, it is a rather odd limitation of the garbage collector as well. Most GCs works around the problem by being able to allocate memory in chunks that are different. Still - this solution, one large chunk, is by far the simplest and fastest solution to the problem.

I haven't run windows in a long time, but I do remember from when I did run some servers that there were a lot of configuration options for how the kernel will treat memory allocation for a process. There is a also a big difference between windows versions, for eg. XP is optimized by default for a lot of different applications being opened where it will swap and fragment a foreground process even if it hasn't hit limits as it is anticipating other applications to be opened.

I think that a combination of allocating more to userland, killing all the default services and trimming the server, along with telling the memory manager to treat go as a background process would solve this.

Nothing to do with the problem.