Re: memory use

*To*: mathgroup at smc.vnet.net*Subject*: [mg4819] Re: memory use*From*: Harald Berndt <hberndt9 at mail.idt.net>*Date*: Fri, 20 Sep 1996 01:12:40 -0400*Organization*: IDT Corporation*Sender*: owner-wri-mathgroup at wolfram.com

Russell Towle wrote: > > ... so I thought that writing it to a file might be a good device. > > I use the syntax, (biglist >> "filename"), but to my surprise, the kernel > requires tons of memory to execute this, even though the list "biglist" is > already evaluated, and every element in it already resides in memory. > > By allocating 40 MB of memory to the kernel, I was able to write the list > to a file. The file size itself was only 3MB. Why does MMA need 16 Yeah, well ... I ran into that problem quite often myself. I think the problem is that using biglist >> "filename" one makes Mathematica convert all the numbers in the list from Mma's internal representation to strings (in particular, each real is written as an 18+ digit string), then write those strings to disk. Very memory-demanding! A workaround might be to write your own binary read and write routines (or just use those available, if that's sufficient ... haven't looked at that in detail lately). -- ______________________________________________________________________ Harald Berndt, Ph.D. Research Specialist, Consultant Phone: 510-652-5974 FAX: 510-215-4299 ______________________________________________________________________ "I yam what I yam"...................................Popeye the sailor (Kryten:............"I thought that was Descartes!"..................) (Lister:............"So did I. mon, so did I!".......................) ==== [MESSAGE SEPARATOR] ====