On 3/3/06, Christopher Faylor <me@xxxxxx> wrote: > On Thu, Mar 02, 2006 at 10:54:08PM +0100, Alex Riesen wrote: > >Alex Riesen, Thu, Mar 02, 2006 18:09:23 +0100: > >>I'll cleanup the profiling code and send it as well soon (I had to > >>instrument x*alloc). > > > >This is not exactly the same. It counts free as well, even if that is > >not really interesting - there are places were there is more frees than > >allocs. Probably something missed or a result coming from libc. > > > >Also it is _not_ the code I used for windows. I had to have a global > >variable for argv[0], which needs modification of all main()s, which > >gets too easily out of sync. > > I wasn't following this discussion closely so maybe this is useless > information, but for Cygwin you can either use the undocumented global > __argv or you can use /proc/cmdline. /proc/self/cmdline is going to be > pretty slow, however. Oh, thanks. The speed is of no problem here: it's in atexit callback. > It looks like pure Windows console apps define _argv in stdlib.h also > but I've never used this and don't know if it is what it looks like. It works as usual argv. I used "char **__argv", got the message from linker: Info: resolving ___argv by linking to __imp____argv (auto-import) which I almost expected. - : send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html