scot@rtmvax.UUCP (Scot Harris ) (07/24/88)
I recently posted a request for help on behalf of a usenetless friend. I would like to thank the many people that took the time to responded. It was very helpful. Below is a message from my friend along with a letter from Manx that he recieved. I felt that those that responded as well as others might find it useful. ------------------------------------------------------------------------- [pulled from the Central Florida Amiga Club BBS (CFAC) (407)249-0686] Msg: #3026 Sec: 2 - Programming 18-Jul-88 09:42 PM Subj: #2989 - C Help!! Mem Allocation From: Jim Seroskie To: Scot Harris (X) I want to thank you for all the help you've been on my large array problem. The messages taken from Usenet were especially helpful. Every one seems to be saying it is a good practice to allocate memory, so I tried this first. The simplest approach and the one for which I had documentation was your suggestion of malloc(). I found I could successfully grab unlimited amounts of memory with your loop. I did control the size of the loop so as not to crash. Went up to 1.5 M I think. When attempting to allocate large blocks without a loop however, I had no luck. A more precise reading of the docs should have revealed the malloc variable as "unsigned" rather than long, meaning a limitation of 64K for this function. Next, the long awaited letter from Manx came in the mail today: (Note that I do have the latest version (3.6a)) ************************************************************* In response to your letter of June 30, we have found your problem. It appears that you are trying to reference an array of >64K of contiguous data. Our compiler has a maximum of 64K for any individual chunk of data. After that, it will "wrap" around and give varying results (closer examination of the assembly code generated will show an array of approximately 36K has been allocated. Thus 100,000 - 64,000 = 36,000). While this is a limitation and not specifically a bug, we hope to allow for larger contiguous chunks of data. Hopefully this feature will be implemented in the next version of our compiler. Thanks for writing, and thank you for your continuing support of Aztec C products. ************************************************************ I've been over the Manx docs a number of times, and can find no mention of this limitation, but from all accounts, it is true. Soooo, it looks as tho I'll have to program around it. I must confess surprise (and dissapointment) at this, but at least I know I'm not crazy and the problem is real! (continued..next message) (UA RE Q): Msg: #3027 Sec: 2 - Programming 18-Jul-88 09:47 PM Subj: #2989 - C Help!! Mem Allocation (R) From: Jim Seroskie To: Scot Harris (X) By the way, I'm really impressed with the replys you got off Usenet. Do you use a service like Tymnet for the phone call, or is it local? Can you give an idea of costs? and a phone number? Thanks again...............Jim ---------------------------------------------------------------------------- [end of message]