<!-- This issue tracker is only for technical issues related to Bitcoin Core. General bitcoin questions and/or support requests are best directed to the Bitcoin StackExchange at https://bitcoin.stackexchange.com. For reporting security issues, please read instructions at https://bitcoincore.org/en/contact/. If the node is "stuck" during sync or giving "block checksum mismatch" errors, please ensure your hardware is stable by running memtest and observe CPU temperature with a load-test tool such as linpack before creating an issue! Any report, issue or feature request related to the GUI should be reported at https://github.com/bitcoin-core/gui/issues/ -->
<!-- Describe the issue -->
While syncing headers with bitcoin-qt my device runs out of memory. I have a computer with only 1GB of RAM and no swap; while syncing headers it runs out of memory. Approximately, 600,000 headers is where it runs out.
<!--- What behavior did you expect? -->
I expected to be able to sync all the headers and then start downloading/verifying the blockchain.
<!--- What was the actual behavior (provide screenshots if the issue is GUI-related)? -->
While syncing the headers my device runs out of memory.
<!--- How reliably can you reproduce the issue, what are the steps to do so? -->
I can reproduce this issue every time. Simply, start the bitcoin-qt application and wait until it runs out of memory at approximately 600,000 headers.
<!-- What version of Bitcoin Core are you using, where did you get it (website, self-compiled, etc)? -->
debian package 22.0-1
<!-- What type of machine are you observing the error on (OS/CPU and disk type)? -->
Orange Pi One http://www.orangepi.org/orangepione/ CPU: H3 Quad-core Cortex-A7 H.265/HEVC 4K Drive: 256GB microSD
<!-- GUI-related issue? What is your operating system and its version? If Linux, what is your desktop environment and graphical shell? -->
<!-- Any extra information that might be useful in the debugging process. -->
<!--- This is normally the contents of a `debug.log` or `config.log` file. Raw text or a link to a pastebin type site are preferred. -->
This issue is probably caused because all the headers are stored in RAM.
Eventually this will become a problem with common lower end computers even if they have swap when the index becomes too large.
It is an important issue to consider so that cheap nodes can be run in third world countries to ensure good decentralization of the network.