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.8 required=5.0 tests=BAYES_00,PLING_QUERY autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,9a5e0182cbfaa45b X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news4.google.com!feeder.news-service.com!news.netcologne.de!newsfeed-fusi2.netcologne.de!newsfeed.straub-nv.de!news.musoftware.de!wum.musoftware.de!news.tornevall.net!.POSTED!not-for-mail From: Jeffrey Carter Newsgroups: comp.lang.ada Subject: Re: Does mmap gives a right result?! Date: Sun, 03 Oct 2010 10:04:47 -0700 Organization: TornevallNET - http://news.tornevall.net Message-ID: References: <459d08e4-1370-4925-9d9f-64ee0f472c19@f25g2000yqc.googlegroups.com> NNTP-Posting-Host: c37809476933d86027e468cfef23c7a1 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: 69222e1d849ed5cac99234d60717b4b2 X-Complaints-To: abuse@tornevall.net User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.12) Gecko/20100915 Thunderbird/3.0.8 X-Complaints-Language: Spoken language is english or swedish - NOT ITALIAN, FRENCH, GERMAN OR ANY OTHER LANGUAGE! In-Reply-To: <459d08e4-1370-4925-9d9f-64ee0f472c19@f25g2000yqc.googlegroups.com> X-UserIDNumber: 1738 X-Validate-Post: http://news.tornevall.net/validate.php?trace=69222e1d849ed5cac99234d60717b4b2 X-Complaints-Italiano: Non abbiamo padronanza della lingua italiana - se mandate una email scrivete solo in Inglese, grazie X-Posting-User: 0243687135df8c4b260dd4a9a93c79bd Xref: g2news1.google.com comp.lang.ada:14368 Date: 2010-10-03T10:04:47-07:00 List-Id: On 10/03/2010 04:27 AM, Francesco PIRANEO GIULIANO wrote: > > fbindex := mmap(0, fbhandler.fixinfo.smem_len, > fbhandler.PROT_READ + fbhandler.PROT_WRITE, fbhandler.MAP_FILE + > fbhandler.MAP_SHARED, fbid, 0); > > if integer(fbindex) = -1 then > raise BADMMAPRESULT; > end if; > > ...seems to be the most logical comparision BUT the following error in > compile phase appears: "illegal operand for numeric conversion" -- Any > help is really apreciated here! :-) Fbindex is an object of an access type. Access values are not numeric, and there is no conversion defined to numeric types for them. Is mmap really defined as returning void*? You could use Unchecked_Conversion to treat the internal representation of Fbindex as the representation of an Integer. You could define Mmap to return Interfaces.C.Int. > When commenting out the above instructions and starting the compiled > application, everything goes right except, when I try to draw inside > the first location the program hungs with the following: > > raised STORAGE_ERROR : stack overflow (or erroneous memory access) I'm not familiar with mmap, but it appears you are trying to access memory address zero, which is protected. -- Jeff Carter "What lazy lout left these wires all over the lawn?" Poppy 98