Pastebin launched a little side project called HostCabi.net, check it out ;-)Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Sep 26th, 2010  |  syntax: None  |  size: 0.67 KB  |  hits: 110  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. Index: firmware/buffer.c
  2. ===================================================================
  3. --- firmware/buffer.c   (revision 28167)
  4. +++ firmware/buffer.c   (working copy)
  5. @@ -20,6 +20,7 @@
  6.   ****************************************************************************/
  7.  #include <stdio.h>
  8.  #include "buffer.h"
  9. +#include "panic.h"
  10.  
  11.  #if (CONFIG_PLATFORM & PLATFORM_HOSTED)
  12.  unsigned char audiobuffer[(MEM*1024-256)*1024];
  13. @@ -44,6 +45,9 @@
  14.      audiobuf += size;
  15.      /* 32-bit aligned */
  16.      audiobuf = (void *)(((unsigned long)audiobuf + 3) & ~3);
  17. +    if (audiobuf > audiobufend) {
  18. +        panicf("OOM: %d bytes", (int) size);
  19. +    }
  20.      
  21.      return retval;
  22.  }