delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2001/09/11/02:58:24

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin AT sources DOT redhat DOT com
From: jgkarman <ffc AT hetnet DOT nl>
Date: Tue, 11 Sep 2001 07:55:37 GMT
Message-ID: <20010911.7553700@linux.local>
Subject: What flags should I use, -mthread, -mthreads, -lmmalloc, .... ?
To: cygwin AT cygwin DOT com
X-Mailer: Mozilla/3.0 (compatible; StarOffice/5.1; Linux)
X-Priority: 3 (Normal)
MIME-Version: 1.0
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id CAA02315

Hello,

I'm trying to port a program to Windows95, using cygwin 1.3.2. It 
consists of a GUI displaying data that are calculated by a background 
process, and uses templates in a multithreaded environment. It keeps 
crashing with a segfault when allocating memory for a template, either 
my own or standard templates like std::vector. BTW, the same program 
runs flawlessly for more than a week under linux. 

I tried with various compiler and linker flags, but nothing worked 
until now. Through the mingw users archives I found that it is 
necessary to use -mthreads for both compiling and linking, does this 
also work for cygwin? The linker also recognises -mthread, but the 
compiler doesn't. And in this (cygwin) list somebody (if I remember 
well it was the same person) suggested using -lmmalloc to prevent 
memory errors. The only thing that I achieved by using these flags is 
that it takes longer before it crashes: without mthreads or mmaloc 
after 5 minutes, with mthreads it may take an hour, and I do not 
remember what the added effect of lmmalloc was.

I looked in the users manual, but found no information for either 
mmaloc or -mthread(s), nor did I find any other hints for using 
templates in a multithreaded program.

Can anyone tell me what more I could try, or better yet: what the 
magical flags are to make everything work?

Thanks in advance for any help.

Regards,

Geert Karman




--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019