public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Dan Kegel <dank@kegel.com>
To: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Saving RAM on an all-RAM system by compressing executables?
Date: Sat, 20 Apr 2002 17:06:09 -0700	[thread overview]
Message-ID: <3CC20271.A00B05BC@kegel.com> (raw)

I'm working with an all-RAM system (where a host processor pokes 
the linux kernel and initial ramdisk into RAM, then releases the 
reset line).  The kernel is 2.4.17 or so.
I have only 64 MB (or 32 or 16, depending), so every megabyte is precious.
The C++ app I'm running on this system is 5MB, kinda fat.
I'd like to save a couple megabytes somehow, either by compressing
the executable, or by using execute-in-place.

I made a cramfs image of the app; that shrunk it from 5MB down to 2MB.
You can't mount cramfs images from tmpfs, so I made a little ramfs, 
and loopback mounted it from there, then measured ram usage on a 64MB system
with the app both running and not running.

/bin/free reported (kb):
in tmpfs, not running: 47888
in tmpfs, running:     47244
in cramfs, not running:46972
in cramfs, running:    46336

Looks like I lose!  Using cramfs to compress the app appears to
*waste* a megabyte over just using the noncompressed app.

>From what I can tell, there's no support for execute-in-place
except on MIPS with a hacked gcc.

OK, I've exhausted my stock of clever ideas; does anyone have
a suggestion about how to save RAM in my situation?
(gzexe won't do it, nor will upx, as they all create a temporary
uncompressed file on execution...)

Thanks,
Dan

                 reply	other threads:[~2002-04-21  0:04 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=3CC20271.A00B05BC@kegel.com \
    --to=dank@kegel.com \
    --cc=linux-kernel@vger.kernel.org \
    /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