How to Allocate Memory

(geocar.sdf1.org)

58 points | by tosh 3 days ago

2 comments

  • 5o1ecist 1 hour ago
    > The operating system often has a tool for allocating contiguous virtual memory space called pages.

    "often". sheesh. *rolls eyes*

    It does not apply for Windows.

    You cannot reserve or commit 4k-pages in Windows. For historical reasons, the minimum amount of memory you can reserve/commit is 64k.

    This also applies to mapping 4k-pages around, meaning you can't.

    64k is the rather wastefull lower limit.

    • dooglius 11 minutes ago
      How does WSL1 do it then?

      Anyway, the section you are quoting makes no claim as the the permitted granularity.

  • anonymousDan 4 hours ago
    Nice reference, thanks.