From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,ae89bc624e48de0c X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 1995-02-27 20:19:41 PST Path: nntp.gmd.de!stern.fokus.gmd.de!ceres.fokus.gmd.de!zib-berlin.de!uni-duisburg.de!RRZ.Uni-Koeln.DE!news.dfn.de!scsing.switch.ch!news.rediris.es!news.uoregon.edu!usenet.eel.ufl.edu!news-feed-1.peachnet.edu!gatech!swrinde!cs.utexas.edu!news.sprintlink.net!bighorn.accessnv.com!usenet From: jfj (John Fountain, Jr.) Newsgroups: comp.lang.ada Subject: Re: Ada for C30 Date: Tue, 28 Feb 95 04:19:41 GMT Organization: accessnv.com Distribution: world Message-ID: <3iu8h1$nck@bighorn.accessnv.com> References: <19950223161056.jlkollig@space.honeywell.com> <3ikn7k$3qp@cnj.digex.net> <3io711$hs5@bighorn.accessnv.com> <1995Feb26.083812.9229@eisner> NNTP-Posting-Host: bighorn X-Newsreader: News Xpress Version 1.0 Beta #2.1 Date: 1995-02-28T04:19:41+00:00 List-Id: kilgallen@eisner.decus.org (Larry Kilgallen, LJK Software) wrote: >In article <3io711$hs5@bighorn.accessnv.com>, jfj (John Fountain, Jr.) writes: > >> writing phase at all. This should prove to be interesting. >> Overall, my intuition tells me if I could do it in C I can >> do it in Tartan Ada with a little careful construction. This is a refernce to CODE GENERATION AND OPTIMIZATION. >> Probably the biggest hurdle is that C's memory allocation >> are very easy to predict, while in Ada we are not always >> sure of what the compiler will construct and where things >> will be allocated from. THIS IS A REFERENCE TO STACK USAGE. > >There have always been problems with people writing a Fortran >program in some other language, such that no matter what language >they use it comes out looking like Fortran. Pretty rude. Where is the reference to FORTRAN? I like it. Used it for years. Beats Pabst Blue Ribbon. > >If you need to know how C or Ada is going to allocate the memory, >and depend on undocumented (and therefore non-guaranteed) compiler >behavior, you may be in for a rude awakening with the next version >of any language compiler from any vendor. YES. I NEED TO KNOW. I ALWAYS WANT TO KNOW. I am new to Ada. I do not know if the LRM states that static objects (static is a C'ism for never moves) in the declarative section of a package, will be allocated off the stack when the package is elaborated at run time. This is what Tartan does. Being caught off guard by this, I was just stating that I needed to be CAREFUL as to where I assume objects will be allocated from... > >If you require a particular memory layout, you should depend on >documented features of the language. In Ada the Representation >Clauses are the major mechanism for accomplishing this. In some >cases Address Clauses may also be relevant. I am well aware of the FOR USE AT clause. This is very useful for those objects like UARTS, but I think it would be un-Ada to use this to overcome stack allocations. > >Whatever your language, you should rely on documented (and therefore >guaranteed) compiler features to produce particular memory usage. I always strive to use every undocumented feature of every OS and language I come by, as evidenced by my posting. In fact, I have written a letter to Mr. Bill Gates stating that I would be the premier Windows programmer since I am so good at doing this. (Novell has made an offer but they don't do it like Windoze does.) > >Larry Kilgallen >whose representation clauses >"just worked" when DEC released Alpha AXP :-) Nice machine. Try it on a DSP with local/global/cache that change size from board to board and change wait state just to aggravate you. pleasently insulted, John Fountain, Jr. jfj@accessnv.com ************************************************************************* This is just filler. I hope you don't bother reading it. **************************************************************************