3 ms·
Virtual memory isn't free. 16k threads with 8gb stacks technically needs like 250gb of page tables. You must be using some strange memory model and microprocess
by jart 5y ago
Virtual memory isn't free. 16k threads with 8gb stacks technically needs like 250gb of page tables. You must be using some strange memory model and microprocessor that lets you have 92 bits of address space.
- aidenn0 5y ago1. 2^46 + 2^46 is 2^47 2. The actual size of the page-table will depend on the page sizes supported by the architecture. On modern x86_64 for programs with less than 32k threads, It might make sense to use 1GB stacks with 1GB guard pages, for just 2 PTEs per thread, less than the 5 needed for 8MB using 2MB pages.