[LispM-Hackers] Outageness

James A. Crippen james@unlambda.com
22 Feb 2002 21:07:13 -0900


Nyef <nyef@softhome.net> writes:

> While unlambda was gone I noticed that E3 is allocating _four times_ as
> much memory as it needs during startup (compare the size of an instance of
> e3MemMap to the size of the load band), which runs my system close to out
> of swap space (possible fixes include: doing a check against the different
> memory regions, emulating part of the memory management hardware (page
> hash table and such), (ab)using the UN*X mmap() syscall, and simply
> declaring it a feature).

mmap() is Not Allowed because it's not portable to, say, PalmOS.  Or
(possibly) to Windows.  It's too un*x specific.

As for emulating the PHT, I think that would be an ugly mess to deal
with.  Certainly it could be done, but I think that it would hurt
performance quite a bit, as well as being unneccesary (since the host
operating system probably knows a lot more about efficient swapping
than we do).

If you say that it's four times the necessary amount, could it be
because someone is allocating with bytes->words in mind when the
actual allocation unit is already words?  Haven't looked but that
might be a stupid mistake that could cause this.

BTW, it's basically impossible to run E3 with less than 32MB of
memory.  This is the size of the load band and we expect to at least
have that much.  In the future once we can look at the running system
perhaps we can do some magic with a sparse array, or something.

> There's a pile of textified chapters of ssdn2 that aren't on unlambda.com
> up at http://www.dridus.com/~nyef/lispm/ssdn2/ and now that there appears
> to be a point again I may find time to do a few more soon...

I'm still caught up with taking care of networking things, so I'll
get to that soon, though not instantly.

'james 

-- 
James A. Crippen <james@unlambda.com> ,-./-.  Anchorage, Alaska,
Lambda Unlimited: Recursion 'R' Us   |  |/  | USA, 61.20939N, -149.767W
Y = \f.(\x.f(xx)) (\x.f(xx))         |  |\  | Earth, Sol System,
Y(F) = F(Y(F))                        \_,-_/  Milky Way.