title: static memory vs heap memory?
body: <p>Im working in a memory restricted environment and need to create strings dynamically, but still have them not take up heap memory. So does this make sense:</p>
  
  <pre><code>static char staticStringBuffer[10240];
  static size_t staticStringWatermark = 0;
  
  void createString( const char * something, const char * somethingElse ) {
      char buf[1024];
      strcat(buf, "test");
      strcat(buf, something);
      strcat(buf, somethingElse);
  
      strcat(&amp;staticStringBuffer[staticStringWatermark], buf);
      staticStringWatermark += strlen(buf+1);
  }
  </code></pre>
  
  <p>This probably dosent compile, but is what I am attempting sane - sacrificing static memory for heap memory?</p>
  
  <p>Thank-you ^_^</p>