Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!helios!inetg1!dprrhb From: dprrhb@inetg1.ARCO.COM (Reginald H. Beardsley) Newsgroups: comp.os.minix Subject: Re: #! in MM -- take 2 Message-ID: <1991May24.164952.22295@Arco.COM> Date: 24 May 91 16:49:52 GMT References: <10033@star.cs.vu.nl> <10055@star.cs.vu.nl> Sender: dprrhb@inetg1 (Reginald H. Beardsley) Organization: ARCO Oil & Gas Company Lines: 27 In article <10055@star.cs.vu.nl>, kjb@cs.vu.nl (Kees J. Bot) writes: > klamer@mi.eltn.utwente.nl (Klamer Schutte) writes, etc. > > >>- The ALIGN(len) is still at the wrong place. Try moving only the strings > >> by disp bytes, then move the pointers by argc*sizeof(char *) bytes. Do > >> an ALIGN(disp) just before the return. > > >This will destroy alignment of the strings pointed by by argv[] and envp[]. > > Strings are made of bytes, and bytes have an alignment of 1, you can't > destroy that! The argv and envp arrays are made of char *'s, so they > need an alignment of sizeof(char *) in the worst case. > It is not the alignment of the characters that matters, it is the alignment of the adjacent full word values that matters. This means that in addition to starting the string on a word boundary, to needs to be padded to a multiple of the word length. For SPARC this will need to be 4 bytes. Even on systems that will tolerate the misalignment, there are very significant performance penalties for breaking the alignment. -- Reginald H. Beardsley ARCO Information Services Plano, TX 75075 Phone: (214)-754-6785 Internet: dprrhb@arco.com