Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Nov 15th, 2010  |  syntax: C  |  size: 0.47 KB  |  hits: 154  |  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. #include <stdio.h>
  2. #include <string.h>
  3. #include <stdlib.h>
  4. #include "/home/ahan/Downloads/linuxutils_2_25_05_11/packages/ti/sdo/linuxutils/cmem/include/cmem.h"
  5.  
  6. int main()
  7. {
  8.     CMEM_init();
  9.     CMEM_AllocParams cmemParams = { CMEM_POOL, CMEM_NONCACHED, 4096 };
  10.  
  11.     char *data = CMEM_alloc(1920*1080*4*3+2000, &cmemParams);
  12.     int i = 0;
  13.     for (i = 0; i < 1920*1080*4*3+2000; ++i)
  14.     {
  15.         data[i];
  16.     }
  17.     printf("Data: %p\n", data);
  18.  
  19.     return 0;
  20. }