Article View: comp.os.os2.programmer
Article #2859malloc()ing huge (> 3 megabyte) data structures
From: Steven Hayes
Date: Tue, 15 Dec 1992 13:55
Date: Tue, 15 Dec 1992 13:55
29 lines
1740 bytes
1740 bytes
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
Technical Details
Message-ID:
<16237@goanna.cs.rmit.oz.au>Path:
arc1-ca.pugleaf.net!sparky!uunet!munnari.oz.au!goanna!stevehShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!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