This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: 16 bytes not freed on close


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@cygnus.com" with one line of text: "help".


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]