#include #include #include #include int main( void ) { struct memcntl_mha arg = { 0 }; int retval; puts("start."); arg.mha_cmd = MHA_MAPSIZE_STACK; arg.mha_flags = 0; arg.mha_pagesize = 65536; retval = memcntl(NULL, 0, MC_HAT_ADVISE, &arg, 0, 0); printf("memcntl(NULL, 0, MC_HAT_ADVISE, &arg, 0, 0) returned %d\n", retval); arg.mha_cmd = MHA_MAPSIZE_BSSBRK; arg.mha_flags = 0; arg.mha_pagesize = 65536; retval = memcntl(NULL, 0, MC_HAT_ADVISE, &arg, 0, 0); printf("memcntl(NULL, 0, MHA_MAPSIZE_BSSBRK, &arg, 0, 0) returned %d\n", retval); malloc(1024*1024*32); sleep(500); puts("stop."); return EXIT_SUCCESS; }