[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Alignment
First, sorry if I shouldn't be posting to the net from this account. Normally,
I post under ekl@sdf.lonestar.org, but that site has been getting flakey so
I've been trying to subscribe from here. So far nothin', but teh other site
crashed I need to ask a major question.
If I cast a const char * such as "MiNT" or "LIVE" to a long *, shouldn't
the compiler store the string so that it is aligned to a long boundary?
Otherwise, when trying to read the long at that address, it could be on
an odd address, and the machine dies.
Lately, that is the way I've been reading strings to compare to cookie tags.
It has always worked, but when I changed main.c in mint, it crashes and I'm
pretty sure its because the 68K can't read a long from an odd address. Is
this a bug in the compiler, or is such a cast simply bad programming? If
this is a bug in 2.4.5 and it will work in 2.5.8, then lemme know and I can
post the diffs for the cookie jar call and DOM_X (partially implemented).
Also, MINIX.XFS is still acting weird. I can't say if addroottimeout is
at fault or if MINIX.XFS PL10 is buggy, or MINIX just gets messed up when
you have ZONE 0 COUNT 1 (whatever that means. Minix reports the error and
fsck CANNOT fix it. It trashed a floppy too - says it cannot access large
partition A: When I try to fsck: it I get set_size BUS ERROR and that's
it. Its a pain since every so often my files will grow blocks of nulls
where the data should be, and if I then delete that file, I get errors
about removing an already free zone .. or already free inode or something.
Any file I modify on my Minix partition may actually be crunched. This
has been happeneing ever since I changed to Mint 1.10 (which had addrootimeout)
but I switch to PL10 of Minix xfs before that, so I think it has to do with
addrootimeout. Can I switch back to PL9 without losing data? Or compile
PL10 to use the update daemon again? Before Minix was my most stable
partition, now its the worst!
I have code for file cookie caching too. If I ever get 2.5.8 set up again
I'll work on it (I just need part ad of the archive and BART is ignoring me).
Oh .. my crashing MiNT compiles with only 1 warning, and that is about altsize
being used uninitialized in mem.c (and that is a bogus warning anyway).
Many Thanks.