jackin@vehka.uta.fi (Markku M{enp{{) (01/09/90)
I need to know how much memory I have for my program (tries to simulate neural nets) to play with. I have used something that gives me the biggest block available, but couldn't find a way to get the whole memory (Mega 2). I am using FTL modula-2, which has all the standard libraries with usual naming. I think I can cope with C-code. I need the information before 15.1.(1990 ;-) Thanks, MM.
wallace@oldtmr.dec.com (Ray Wallace) (01/10/90)
In article <790@kielo.uta.fi>, jackin@vehka.uta.fi (Markku M{enp{{) writes... >I need to know how much memory I have for my program Just keep malloc'ing the amount of memory returned by malloc(-1) untill you run out of memory. If you sum the amount of memory malloc'ed then you'll know the TOTAL amount of free memory (don't forget to then deallocate all the memory if you are not going to use it). Back in October Allan Pratt posted a C example of doing this, if you want the code let me know and I'll mail it or post it. --- Ray Wallace (INTERNET,UUCP) wallace@oldtmr.enet.dec.com (UUCP) ...!decwrl!oldtmr.enet!wallace (INTERNET) wallace%oldtmr.enet@decwrl.dec.com ---