SD.h causing constant reboot
The following libraries are probably used:


SD Card, using a buffer of 512 bytes (see also the comment of DataFiddler below).
SSD1306 OLED library, using a buffer of 1,024 bytes
Serial, using a buffer of 128 bytes (64 for RX, 64 for TX, see comment of Majenko below)


Since there is only 2,048 bytes of SRAM in an Arduino, this leaves 384 bytes. If you actually READ a file you are already above the maximum.

Your own global variables also will consume a considerable amount of SRAM.

Than, if you execute your sketch, parameters and local variables are stored on the stack (in SRAM), so even if your program starts well, it might/will run in problems when calling functions.