Xref: news2.mv.net comp.os.msdos.djgpp:4407 From: myskin AT inp DOT nsk DOT su (Vyacheslav O. Myskin) Newsgroups: comp.os.msdos.djgpp Subject: How much free memory? Date: Thu, 30 May 1996 06:25:28 GMT Organization: BINP RAS Lines: 23 Message-ID: <4ojf0s$o2q@sky.inp.nsk.su> References: <4ofa1t$ifo AT usenet DOT rpi DOT edu> Reply-To: myskin AT inp DOT nsk DOT su NNTP-Posting-Host: csd-bsdi.inp.nsk.su To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp calvid AT matisse DOT its DOT rpi DOT edu (David J. Calvin) wrote: >How exactly do I find how much free physical memory is available to my >program? I'm sure there is a function somewhere to do it, but I don't >know what it is. Thanks in advance. I'd like to know the answer too. I've browsed the list of memory-related functions and found nothing to get the amount of memory available. And here are some results of my experiments with malloc: swap on off Largest allocatable block returned by DPMI: 26Mb 3Mb Largest block malloc can allocate: 16Mb 2Mb Malloc seems to grab about 30% of memory for its needs! Is there any way to tune it? If I want to allocate all my free memory as one big block, perhaps I don't need several Mb to store information about it. Best wishes, V. Myskin