Pastey simple gets(), and out of memory 2

C:\Euphoria-4.0.4\filesizetest.exw:24
Your program has run out of memory. 
One moment please...  
 
 
Public & Export & Global & Local Variables 
 
 c:\Euphoria-4.0.4\include\std\memconst.e: 
    DEP_really_works = 1 
    use_DEP = 1 
    FREE_RID = 1 
    kernel_dll = <no value> 
    memDLL_id = <no value> 
    VirtualAlloc_rid = <no value> 
    VirtualLock_rid = <no value> 
    VirtualUnlock_rid = <no value> 
    VirtualProtect_rid = <no value> 
    GetLastError_rid = <no value> 
    GetSystemInfo_rid = <no value> 
 
 c:\Euphoria-4.0.4\include\std\memory.e: 
    edges_only = <no value> 
    check_calls = 1 
    VirtualFree_rid = 25 
 
 c:\Euphoria-4.0.4\include\std\types.e: 
    Defined_Sets = { 
                     {98'b',99'c',100'd',102'f',103'g',104'h',106'j',107'k', 
108'l',109'm',110'n',112'p',113'q',114'r',115's',116't',118'v',119'w',120'x', 
121'y',122'z',66'B',67'C',68'D',70'F',71'G',72'H',74'J',75'K',76'L',77'M', 
78'N',80'P',81'Q',82'R',83'S',84'T',86'V',87'W',88'X',89'Y',90'Z'}, 
                     {97'a',101'e',105'i',111'o',117'u',65'A',69'E',73'I', 
79'O',85'U'}, 
                     { 
                       {48'0',57'9'}, 
                       {65'A',70'F'}, 
                       {97'a',102'f'} 
                     }, 
                     {32' ',9,10,13,11,160}, 
                     { 
                       {32' ',47'/'}, 
                       {58':',63'?'}, 
                       {91'[',96'`'}, 
                       {123'{',126'~'} 
                     }, 
                     { 
                       {32' ',126'~'} 
                     }, 
                     { 
                       {32' ',126'~'}, 
                       {32' ',32' '}, 
                       {9,9}, 
                       {10,10}, 
                       {13,13}, 
                       {8,8}, 
                       {7,7} 
                     }, 
                     { 
                       {97'a',122'z'} 
                     }, 
                     { 
                       {65'A',90'Z'} 
                     }, 
                     { 
                       {48'0',57'9'}, 
                       {97'a',122'z'}, 
                       {65'A',90'Z'} 
                     }, 
                     { 
                       {48'0',57'9'}, 
                       {97'a',122'z'}, 
                       {65'A',90'Z'}, 
                       {95'_',95'_'} 
                     }, 
                     { 
                       {97'a',122'z'}, 
                       {65'A',90'Z'} 
                     }, 
                     { 
                       {0,127''} 
                     }, 
                     { 
                       {0,31}, 
                       {127'',127''} 
                     }, 
                     { 
                       {48'0',57'9'} 
                     }, 
                     { 
                       {33'!',126'~'} 
                     }, 
                     { 
                       {0,255} 
                     }, 
                     {95'_'}, 
                     {1,0} 
                   } 
 
 c:\Euphoria-4.0.4\include\std\machine.e: 
    FREE_ARRAY_RID = 2 
    page_size = 4096 
    kernel_dll = 2088763392 
    memDLL_id = 2088763392 
    VirtualAlloc_rid = 23 
    VirtualProtect_rid = 24 
    GetLastError_rid = 26 
    GetSystemInfo_rid = 27 
    vaa = <no value> 
    system_info_ptr = <no value> 
    oldprotptr = 10963944 
 
 c:\Euphoria-4.0.4\include\std\convert.e: 
    mem = 11976160 
    decimal_mark = 46'.' 
 
 c:\Euphoria-4.0.4\include\std\pretty.e: 
    pretty_end_col = <no value> 
    pretty_chars = <no value> 
    pretty_start_col = <no value> 
    pretty_level = <no value> 
    pretty_file = <no value> 
    pretty_ascii = <no value> 
    pretty_indent = <no value> 
    pretty_ascii_min = <no value> 
    pretty_ascii_max = <no value> 
    pretty_line_count = <no value> 
    pretty_line_max = <no value> 
    pretty_dots = <no value> 
    pretty_line_breaks = <no value> 
    pretty_printing = <no value> 
    pretty_fp_format = <no value> 
    pretty_int_format = <no value> 
    pretty_line = <no value> 
 
 c:\Euphoria-4.0.4\include\std\serialize.e: 
    mem0 = 13968600 
    mem1 = 13968601 
    mem2 = 13968602 
    mem3 = 13968603 
 
 c:\Euphoria-4.0.4\include\std\text.e: 
    lower_case_SET = {} 
    upper_case_SET = {} 
    encoding_NAME = {65'A',83'S',67'C',73'I',73'I'} 
    user32 = 2118189056 
    api_CharLowerBuff = 28 
    api_CharUpperBuff = 29 
    tm_size = 1024 
    temp_mem = 12791192 
 
 c:\Euphoria-4.0.4\include\std\io.e: 
    mem0 = 14910016 
    mem1 = 14910017 
    mem2 = 14910018 
    mem3 = 14910019 
 
 c:\Euphoria-4.0.4\include\std\get.e: 
    input_file = <no value> 
    input_string = <no value> 
    string_next = <no value> 
    ch = <no value> 
    leading_whitespace = <no value> 
 
 c:\Euphoria-4.0.4\include\std\datetime.e: 
    month_names = { 
                    {74'J',97'a',110'n',117'u',97'a',114'r',121'y'}, 
                    {70'F',101'e',98'b',114'r',117'u',97'a',114'r',121'y'}, 
                    {77'M',97'a',114'r',99'c',104'h'}, 
                    {65'A',112'p',114'r',105'i',108'l'}, 
                    {77'M',97'a',121'y'}, 
                    {74'J',117'u',110'n',101'e'}, 
                    {74'J',117'u',108'l',121'y'}, 
                    {65'A',117'u',103'g',117'u',115's',116't'}, 
                    {83'S',101'e',112'p',116't',101'e',109'm',98'b',101'e', 
114'r'}, 
                    {79'O',99'c',116't',111'o',98'b',101'e',114'r'}, 
                    {78'N',111'o',118'v',101'e',109'm',98'b',101'e',114'r'}, 
                    {68'D',101'e',99'c',101'e',109'm',98'b',101'e',114'r'} 
                  } 
    month_abbrs = { 
                    {74'J',97'a',110'n'}, 
                    {70'F',101'e',98'b'}, 
                    {77'M',97'a',114'r'}, 
                    {65'A',112'p',114'r'}, 
                    {77'M',97'a',121'y'}, 
                    {74'J',117'u',110'n'}, 
                    {74'J',117'u',108'l'}, 
                    {65'A',117'u',103'g'}, 
                    {83'S',101'e',112'p'}, 
                    {79'O',99'c',116't'}, 
                    {78'N',111'o',118'v'}, 
                    {68'D',101'e',99'c'} 
                  } 
    day_names = { 
                  {83'S',117'u',110'n',100'd',97'a',121'y'}, 
                  {77'M',111'o',110'n',100'd',97'a',121'y'}, 
                  {84'T',117'u',101'e',115's',100'd',97'a',121'y'}, 
                  {87'W',101'e',100'd',110'n',101'e',115's',100'd',97'a', 
121'y'}, 
                  {84'T',104'h',117'u',114'r',115's',100'd',97'a',121'y'}, 
                  {70'F',114'r',105'i',100'd',97'a',121'y'}, 
                  {83'S',97'a',116't',117'u',114'r',100'd',97'a',121'y'} 
                } 
    day_abbrs = { 
                  {83'S',117'u',110'n'}, 
                  {77'M',111'o',110'n'}, 
                  {84'T',117'u',101'e'}, 
                  {87'W',101'e',100'd'}, 
                  {84'T',104'h',117'u'}, 
                  {70'F',114'r',105'i'}, 
                  {83'S',97'a',116't'} 
                } 
    ampm = { 
             {65'A',77'M'}, 
             {80'P',77'M'} 
           } 
 
 c:\Euphoria-4.0.4\include\std\filesys.e: 
    my_dir = -2 
    InitCurDir = {67'C',58':',92'\',69'E',117'u',112'p',104'h',111'o',114'r', 
105'i',97'a',45'-',52'4',46'.',48'0',46'.',52'4',92'\',98'b',105'i',110'n', 
92'\'} 
    file_counters = {} 
 
 C:\Euphoria-4.0.4\filesizetest.exw: 
    size = 9009698613 
    junk = -1 
    junk1 = <no value> 
    junk2 = <no value> 
    junk3 = <no value> 
    readfile = 3 
    readfilename = {69'E',58':',92'\',89'Y',65'A',71'G',79'O',92'\',121'y', 
97'a',103'g',111'o',50'2',99'c',111'o',114'r',101'e',95'_',50'2',48'0',49'1', 
50'2',48'0',49'1',48'0',57'9',92'\',117'u',115's',105'i',110'n',103'g',46'.', 
116't',115's',118'v'} 
 
 
Traced lines leading up to the failure: 
 
C:\Euphoria-4.0.4\filesizetest.exw:24	  size += length(junk) 
C:\Euphoria-4.0.4\filesizetest.exw:25	  puts(1,sprintf("%d",size)&"\r") 
C:\Euphoria-4.0.4\filesizetest.exw:26	end while 
C:\Euphoria-4.0.4\filesizetest.exw:23	  junk = gets(readfile) 
C:\Euphoria-4.0.4\filesizetest.exw:24	  size += length(junk) 
C:\Euphoria-4.0.4\filesizetest.exw:25	  puts(1,sprintf("%d",size)&"\r") 
C:\Euphoria-4.0.4\filesizetest.exw:26	end while 
C:\Euphoria-4.0.4\filesizetest.exw:23	  junk = gets(readfile) 
C:\Euphoria-4.0.4\filesizetest.exw:24	  size += length(junk) 
C:\Euphoria-4.0.4\filesizetest.exw:25	  puts(1,sprintf("%d",size)&"\r") 
C:\Euphoria-4.0.4\filesizetest.exw:26	end while 
C:\Euphoria-4.0.4\filesizetest.exw:23	  junk = gets(readfile) 
C:\Euphoria-4.0.4\filesizetest.exw:24	  size += length(junk) 
C:\Euphoria-4.0.4\filesizetest.exw:25	  puts(1,sprintf("%d",size)&"\r") 
C:\Euphoria-4.0.4\filesizetest.exw:26	end while 
C:\Euphoria-4.0.4\filesizetest.exw:23	  junk = gets(readfile) 
C:\Euphoria-4.0.4\filesizetest.exw:24	  size += length(junk) 
C:\Euphoria-4.0.4\filesizetest.exw:25	  puts(1,sprintf("%d",size)&"\r") 
C:\Euphoria-4.0.4\filesizetest.exw:26	end while 
C:\Euphoria-4.0.4\filesizetest.exw:23	  junk = gets(readfile) 
C:\Euphoria-4.0.4\filesizetest.exw:24	  size += length(junk) 
C:\Euphoria-4.0.4\filesizetest.exw:25	  puts(1,sprintf("%d",size)&"\r") 
C:\Euphoria-4.0.4\filesizetest.exw:26	end while 
C:\Euphoria-4.0.4\filesizetest.exw:23	  junk = gets(readfile) 
C:\Euphoria-4.0.4\filesizetest.exw:24	  size += length(junk)