#include #include #include #define TRUE 0 #define FALSE -1 #define MAX_HEAP_SIZE 16711600 /* 高速ヒープ・サイズ 16MB*/ #define TERA_HEAP_SIZE 214748324 /* 高速ヒープ・サイズ 2GB */ void main(void){ char* buf; long heap_size; printf("** TESTMLC : 最大ヒープ・サイズ **\n"); getchar(); heap_size = TERA_HEAP_SIZE; buf = (char*)malloc(heap_size); if(buf == NULL){ printf("* buf %d cannot be assigned.\n", heap_size); } else{ printf("* buf %d is OK!\n", heap_size); free(buf); } getchar(); }