Newsgroups: comp.lang.apl
From: ibe@world.std.com (ira b ekhaus)
Subject: is J a memory hog, and how does it use the  swap space?
Message-ID: <Cr1I5J.FBy@world.std.com>
Organization: The World Public Access UNIX, Brookline, MA
Date: Tue, 7 Jun 1994 18:32:06 GMT
Lines: 45

Hi,
I'd like to hear from others who might have had problems or questions
about J's use of memory.
My version  of J, now uses the garbage collection package that emmett
posted about, but I've seen the same problem before I linked that package in.


I've just swamped out my computer's swap space once again.
It involved having about three variables of dimensions
30 16 32
and one variable  of dimension
K 30 16 32

where I've setting K to about 30.

that gives a memory requirement of about

sizeofdouble * */ (K+3) 30 16 32

of about 4.3 Mbytes.

 If you want to do anything useful with as a data volume to slice and
dice, you had better have the ram to keep this guy in silicon instead
of on the swap file, or you'll swap forever.

When I finish taking off the memory requirements of emacs , X and a
few other things floating around on my linux system, I just barely
squeak by, which means I don't make it in the real world.  I'm willing
to drop K down until I can order more ram ;-), but what's disturbing
is that looking at the output of the unix command

ps -aux

suggests that after I'm using up about 20Mbytes of virtual memory,
significantly more than the space required to hold the variables I've
defined.

So even after I buy more ram (to get to 16Mbyte), it seems that I'll
be out of luck.  I'd like others to see if their version of J, has
similar inefficiencies in memory storage by psaux'ing before and after
a significant memory allocation.

Hope this is clear,

thanks,

