A GPS and SD logger is tight on an ATmega328P.
One program I have for that, which includes a SSD1306 OLED display uses;
Sketch uses 24482 bytes (75%) of program storage space. Maximum is 32256 bytes.
Global variables use 1646 bytes (80%) of dynamic memory, leaving 402 bytes for local variables. Maximum is 2048 bytes.
Although it drops to;
Sketch uses 19208 bytes (59%) of program storage space. Maximum is 32256 bytes.
Global variables use 1227 bytes (59%) of dynamic memory, leaving 821 bytes for local variables. Maximum is 2048 bytes.
Without the display.