home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / os / os2 / programm / 7031 < prev    next >
Encoding:
Internet Message Format  |  1992-12-15  |  1.7 KB

  1. Path: sparky!uunet!munnari.oz.au!goanna!steveh
  2. From: steveh@goanna.cs.rmit.oz.au (Steven Hayes)
  3. Newsgroups: comp.os.os2.programmer
  4. Subject: malloc()ing huge (> 3 megabyte) data structures
  5. Message-ID: <16237@goanna.cs.rmit.oz.au>
  6. Date: 15 Dec 92 13:55:52 GMT
  7. Organization: Comp Sci, RMIT, Melbourne, Australia
  8. Lines: 29
  9.  
  10. Hi people,
  11.  
  12. I'm working on some neural net software using ICC under OS/2 2.0. I need
  13. to be able to allocate HUGE arrays, around the 3 megabyte mark, and I'm 
  14. using an 8 megabyte machine. Thank god for virtual memory ;-)
  15.  
  16. Ok, so I malloc() the array(s), and everything _appears_ to be fine. I check
  17. that malloc returns non-NULL values, etc, and it _seems_ that everything is
  18. fine. Unfortunately, I'm getting floating point underflow errors when I
  19. start performing operations on the arrays. The underflow errors don't seem
  20. to occur in the same place (IPMD tells me this). I don't understand why this
  21. is happening. Are there bugs in the VM management?
  22.  
  23. The reason why I think there are some virtual memory and/or compiler bugs
  24. is that my code works _beautifully_ for smallish neural networks (< 2500
  25. nodes and 10000 weights, in NN speak). But start asking the _same_ binary
  26. code to build and train bigger networks results in underflow.
  27.  
  28. I'm using malloc() instead of DosAllocMem() to retain UNIX portability. I'll
  29. try running the code on a UNIX workstation tomorrow and we'll see what
  30. happens.
  31.  
  32. If you have any experiences with allocating large chunks of memory please
  33. mail me or follow-up. I'd be most interested to hear from you.
  34.  
  35. Steve
  36. -- 
  37.    Steven Hayes                                    |  steveh@rmit.edu.au
  38.    Royal Melbourne Institute of Technology (RMIT)  |  +61 3 660-2693
  39.