EU 2.2: allocate() bug?
- Posted by Rolf Schroeder <r.schr at T-ONLINE.DE> Dec 27, 1999
- 359 views
Hi Rob, under WinNT in the CMD-window I fail with the following program: (By the way, I find still only 64MB RAM under DOS, whereas Devore Software promised more than that now!) ------------------------------------------------------------------------------ -- Rolf Schröder 1999-12-27 --> ALLOCW.EXW Allocate as much RAM as possible! Möörkenweg 37 -- ¯¯¯¯¯¯¯¯¯¯ 21029 Hamburg, Germany -- Language: EUPHORIA ver. 2.2 r.schr at t-online.de ------------------------------------------------------------------------------ include get.e -- wait_key() include machine.e -- allocate() include misc.e -- WIN32 ------------------------------------------------------------------------------ constant MB = power(2,20) -- 1 MegaByte constant B = #FF -- 1 Byte, all bits set ------------------------------------------------------------------------------ procedure main() -- ¯¯¯¯ atom a integer n puts(1,"Allocate and fill as much RAM as possible!\n") puts(1," (press any key to stop)\n\n") for i = 256 to 16 by -16 do n = i * MB a = allocate(n) if a then printf(1,"%5dMB = not allocateble!\n",i) else mem_set(a, B, n) printf(1,"%5dMB = %10d Bytes allocatet!\n", {i,n}) free(a) exit end if if get_key() != -1 then puts(1,"Program aborted by user.\n") exit end if end for if platform() = WIN32 then puts(1," ..press any key..") n = wait_key() end if abort(0) end procedure ------------------------------------------------------------------------------ main() ------------------------------------------------------------------------------