C ++ Reduce memory page size from 4096 bytes

Now on my system (debianx64) the page size is 4096 bytes. Is there any way to reduce it? I would like to store in memory a lot of small pieces, but even for 1 byte is reserved. I can’t use another 4095 due to being added to 1 post here. Is this true or am I mistaken? Can this be done? thanks for the answers.

+3
source share
3 answers

No.

4096 is the smallest page size provided by the x86 platform. This is a processor restriction. It offers large sizes (up to 4 MB, depending on mode), but usually it is selected by the operating system at boot time.

, . , , . .

, , , , .

+10

- . , .

, . , , , , .

+1

The page size (which BTW cannot be lowered below 4K on x86 platforms) is most likely not relevant to your situation. If you select the data on the heap, the question of page size will not arise as you expect.

+1
source

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


All Articles