Advertisement
Kojima0502

malloctest

Nov 1st, 2013
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.29 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3.  
  4.      int main(void)
  5.     {
  6.         float *a;
  7.        
  8.     a = (float *)malloc(1000000*1000000);
  9.    
  10.     if(a==NULL)
  11.     {
  12.         printf("malloc error\n");
  13.     }
  14.     else
  15.     {
  16.         printf("malloc ok\n");
  17.     }
  18.     return 0;
  19.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement