# include # include # include "xmalloc.h" //**************************************************************************************80 int main ( ) //**************************************************************************************80 // // Purpose: // // xmalloc_test2 uses xmalloc to make endless memory requests. // // License: // // I don't care what the hell you do with this code. // // Modified: // // 07 July 2017 // // Author: // // John Burkardt // { int i; size_t nbytes; int *x; printf ( "\n" ); printf ( "xmalloc_test2:\n" ); printf ( " Test xmalloc with increasing sizes.\n" ); nbytes = 1000000000; i = 1; while ( true ) { printf ( " %d: Request %zu bytes of memory:\n", i, nbytes ); x = ( int * ) ymalloc ( nbytes ); i = i + 1; } return 0; }