From: paul DOT toseland AT virgin DOT net (Paul Toseland) Subject: Re: 16 bytes not freed on close 24 Jul 1997 06:25:57 -0700 Approved: cygnus DOT gnu-win32 AT cygnus DOT com Distribution: cygnus Message-ID: <33D4C88D.966.cygnus.gnu-win32@virgin.nospam.net> References: <3 DOT 0 DOT 1 DOT 32 DOT 19970624114507 DOT 0080a7c0 AT unlinfo DOT unl DOT edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 3.01 (Win95; I) Original-To: Steve Kachman <skachman AT unl DOT edu> Original-CC: gnu-win32 AT cygnus DOT com Original-Sender: owner-gnu-win32 AT cygnus DOT com Where did you get this _mstats function from? My program also handles many files, but it is a long-run - e.g. hours, days, months... - background task. When I tried _mstats, importing as you did, I got a link error. It's not defined in any of the headers, except inside the bash source... and if it's a Win32 API function, it's not being imported properly by the import libraries. The same goes for mstats. Steve Kachman wrote: > > Sorry about the 32K message. I have included a small program to illustrate > the problem. > > #include <fstream.h> > extern "C" { > extern unsigned _stklen; > int _mstats(char * s); > } > > main(int argc,char **argv) > { > _mstats("Before open"); (snip) > The resulting output: > > Memory allocation statistics Before open > free: 0 255 124 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 > used: 0 1 4 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 > Total in use: 4240, total free: 8048 Sorry this is so much after the event: it took a while to plough through it all! Oh, and _mstats isn't documented; mstats is, but listed as a GNU extension like memmem and others - which aren't implemented in gnuwin32. - For help on using this list (especially unsubscribing), send a message to "gnu-win32-request AT cygnus DOT com" with one line of text: "help".