Deutsch   English   Français   Italiano  
<8734nldmea.fsf@nosuchdomain.example.com>

View for Bookmarking (what is this?)
Look up another Usenet article

Path: ...!3.eu.feeder.erje.net!feeder.erje.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Keith Thompson <Keith.S.Thompson+u@gmail.com>
Newsgroups: comp.lang.c
Subject: Re: relearning C: why does an in-place change to a char* segfault?
Date: Sat, 03 Aug 2024 19:58:37 -0700
Organization: None to speak of
Lines: 23
Message-ID: <8734nldmea.fsf@nosuchdomain.example.com>
References: <IoGcndcJ1Zm83zb7nZ2dnZfqnPWdnZ2d@brightview.co.uk>
	<20240801114615.906@kylheku.com> <v8gs06$2ceis$1@dont-email.me>
	<v8jlnk$31hqf$1@dont-email.me>
	<87bk29duba.fsf@nosuchdomain.example.com>
	<v8mkao$3n2rq$5@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
Injection-Date: Sun, 04 Aug 2024 04:58:38 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="d07bdb3c66a7f25ead61bbbbc164c6d5";
	logging-data="4067837"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX1+XEfSD0lCVsvoxqowy8W+E"
User-Agent: Gnus/5.13 (Gnus v5.13)
Cancel-Lock: sha1:NkzrSaTdbdU3646xM3Ngf2ZVp6w=
	sha1:7a63NDGSNb6gr68gCIggDSghDdA=
Bytes: 2073

Lawrence D'Oliveiro <ldo@nz.invalid> writes:
> On Sat, 03 Aug 2024 17:07:37 -0700, Keith Thompson wrote:
>
>> ... general compression isn't something I've seen ...
>
> I recall Apple had a patent on some aspects of the “PEF” executable format 
> that they created for their PowerPC machines running old MacOS. This had 
> to do with some clever instruction encodings for loading stuff into 
> memory.

Is that relevant to what I asked about?

What I had in mind is something that, given this:

    static int buf = { 1, 1, 1, ..., 1 }; // say, 1000 elements

would store something less than 1000*sizeof(int) bytes in the executable
file.  I wouldn't be hard to do, but I'm not convinced it would be
worthwhile.

-- 
Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com
void Void(void) { Void(); } /* The recursive call of the void */