Date: Sun, 15 Feb 1998 16:47:42 +0200 (IST) From: Eli Zaretskii To: Peter Palotas cc: djgpp AT delorie DOT com Subject: Re: Thread safe programs. In-Reply-To: <3.0.16.19980215134907.32ef8a54@hem1.passagen.se> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Precedence: bulk On Sun, 15 Feb 1998, Peter Palotas wrote: > Uhm, okay, I'll explain what I'm doing. I'm writing a library somewhat like > FORTIFY if you've heard of it which catches all calls to > new/delete/malloc/free/calloc/realloc and adds stuff to a global linked > list, and checks for out of bounds writings and a lot of other stuff. > > Now maybe it's not neccessary to have global read/write data, but I can't > think of any other way. Another possibility would be a linked list that is private to each thread. Let `malloc' and friends access the correct list given the thread id. Then you could forget about two or more threads accessing the same address at the same time.