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