Sujet : Re: relearning C: why does an in-place change to a char* segfault?
De : Keith.S.Thompson+u (at) *nospam* gmail.com (Keith Thompson)
Groupes : comp.lang.cDate : 05. Aug 2024, 23:40:42
Autres entêtes
Organisation : None to speak of
Message-ID : <875xsebnkl.fsf@nosuchdomain.example.com>
References : 1 2 3 4 5 6 7 8 9 10
User-Agent : Gnus/5.13 (Gnus v5.13)
Lawrence D'Oliveiro <
ldo@nz.invalid> writes:
On Sun, 04 Aug 2024 23:38:14 -0700, Keith Thompson wrote:
Lawrence D'Oliveiro <ldo@nz.invalid> writes:
On Sat, 03 Aug 2024 19:58:37 -0700, Keith Thompson wrote:
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?
>
“Compression”
Was that intended to be responsive?
>
Hint: you have to know something about executable formats.
I am profoundly uninterested in hints.
Here's what you snipped from what I wrote upthread:
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.
There's a lot I don't know about executable formats, and you seem
uninterested in doing more than showing off your presumed knowledge
without actually sharing it. Others have already answered my direct
question (Richard Damon and David Brown mentioned implementations
that use simple run-length encoding, and David gave some reasons
why it could be useful), so you can stop wasting everyone's time.
-- Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.comvoid Void(void) { Void(); } /* The recursive call of the void */