9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: David Hogan dhog@lore.plan9.cs.su.oz.au
Subject: Plan 9 loader memory consumption
Date: Fri, 30 May 1997 09:37:55 +1000	[thread overview]
Message-ID: <19970529233755.Q0eZW9Phz-mUJrtzqYR6JjAySUr-fWyqH3vEdHfz0ws@z> (raw)

I have been trying to compile the X server and ghostscript 4.03
at home.  Unfortunately I "only" bought 32M of RAM, and 8l
tends to use around 29M compiling one of these monsters.
After deducting 3-4M for kernel and ~3M for kfs, I don't have
enough RAM to keep 8l in core.  This means it takes about an hour
to link the X server, and a similarly long time for gs.

As I recall, 8l doesn't use malloc and free; it just allocates
space on the heap and never frees it.  It tends to walk some
fairly large lists multiple times, which adds to the thrashing
behaviour when there isn't enough RAM.  I remember being told
that the justification for this was efficiency; when you have
the RAM, it is a lot faster to avoid the extra overheads of
using a real allocator, or so the argument goes.

I'm starting to wonder if it mightn't be a bad idea to try and
change the way 8l does its allocation, to make compiling
these programs possible on machines which don't have huge
amounts of RAM.  Has anyone else looked at the linker internals
and have an opinion on this?  It's been a while since I looked
in there myself, so I don't have a really good feel for how
much memory is being wasted, or how much locality of reference
there is, or indeed how easy it would be to figure out
what needs to be freed...




             reply	other threads:[~1997-05-29 23:37 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-05-29 23:37 David [this message]
1997-05-30 21:26 Eric

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=19970529233755.Q0eZW9Phz-mUJrtzqYR6JjAySUr-fWyqH3vEdHfz0ws@z \
    --to=9fans@9fans.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).