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,a59c0afeb6808e51 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-09-03 04:42:53 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!nntp.cs.ubc.ca!freenix!enst.fr!not-for-mail From: Samuel Tardieu Newsgroups: comp.lang.ada Subject: Re: Howto debug seg-faulting Ada 95 code? Date: Tue, 03 Sep 2002 13:42:50 +0200 Organization: TELECOM Paris Message-ID: <87wuq3wb7p.fsf@inf.enst.fr> References: <1f358d66.0208302358.6f1c6a39@posting.google.com> <87y9an5tt2.fsf@deneb.enyo.de> <1f358d66.0209020705.6769d948@posting.google.com> NNTP-Posting-Host: beeblebrox.enst.fr Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: avanie.enst.fr 1031053372 69730 137.194.162.67 (3 Sep 2002 11:42:52 GMT) X-Complaints-To: usenet@enst.fr NNTP-Posting-Date: Tue, 3 Sep 2002 11:42:52 +0000 (UTC) Mail-Copies-To: sam@ada.eu.org User-Agent: Gnus/5.090007 (Oort Gnus v0.07) XEmacs/21.4 (Honest Recruiter, i386--freebsd) Cancel-Lock: sha1:CgOpdtYU64BWWC8iib8YG7a+Sps= Xref: archiver1.google.com comp.lang.ada:28692 Date: 2002-09-03T13:42:50+02:00 List-Id: >>>>> "Sergey" == Sergey Koshcheyev writes: Sergey> I would say that x86 compilers place library-level data in Sergey> data sections, initialized or unininitialized. This is the Sergey> best place for them, and data sections aren't stack nor heap, Sergey> they're something else :-) I don't know about other Sergey> architectures, but I suspect the placement of global data is Sergey> similar there. Yup, exactly. In general, you have the following memory areas when you execute a program: (the first three usually come from the executable file if this has any sense in your environment) + text: contains executable code + data: contains pre-initialized data + bss: same as data, but content is initialized to zero (convenient to avoid storing those zeroes in the executable file) + heap: where your global allocations come from + stacks: not shared between thread of controls (each one may have several stacks) - those stacks may be allocated in the heap or may be separate Sam -- Samuel Tardieu -- sam@rfc1149.net -- http://www.rfc1149.net/sam