"SSD1306 allocation failed" when #include SD.h I'm using the ssd1306_128x64_i2c example file from the 1306's library. 

It works perfectly until I add the #include SD.h line, after which it gives the allocation failed error. 

Please advise.

#include &lt;SPI.h&gt;
#include &lt;Wire.h&gt;
#include &lt;Adafruit_GFX.h&gt;
#include &lt;Adafruit_SSD1306.h&gt;
#include &lt;SD.h&gt;

Adafruit_SSD1306 display(128, 64, &amp;Wire, 4);

void setup() {
  Serial.begin(9600);

  // SSD1306_SWITCHCAPVCC = generate display voltage from 3.3V internally
  if(!display.begin(SSD1306_SWITCHCAPVCC, 0x3C)) { 
    Serial.println(F("SSD1306 allocation failed"));
  }

  display.clearDisplay();
  display.display();
  testdrawchar();      
}

void loop() {
}

void testdrawchar(void) {
  display.clearDisplay();
  display.setTextSize(1);      
  display.setTextColor(WHITE); 
  display.setCursor(0, 0);     
  display.cp437(true);         

  for(int16_t i=0; i&lt;256; i++) {
    if(i == '\n') display.write(' ');
    else          display.write(i);
  }
  display.display();
}
I was able to make it all fit by using the text-only library for the OLED.

SSD1306Ascii Library

Much thanks to Majenko for explaining the problem and greiman for writing the library!