In the last episode (Jun 11), Vikash Badal said:
I have a thread socket application that seems to be behaving strangely
In a worker thread, I have the following.
CODE---
LogMessage(DEBUG_0, allocated %ld, malloc_usable_size(inst));
free(inst);
LogMessage(DEBUG_0, after
-Original Message-
From: owner-freebsd-questi...@freebsd.org [mailto:owner-freebsd-
questi...@freebsd.org] On Behalf Of Dan Nelson
Sent: 11 June 2010 09:56 PM
To: Vikash Badal
Cc: freebsd-questions@freebsd.org
Subject: Re: threads and malloc/free on freebsd 8.0
The fix
In the last episode (Jun 11), Vikash Badal said:
-Original Message-
From: owner-freebsd-questi...@freebsd.org [mailto:owner-freebsd-
The fix is to remove your second call to malloc_usable_size(z)). Then
neither version will crash. Also, a useful habit to start is to
On Sat, May 22, 2010 at 1:56 AM, Dan Nelson dnel...@allantgroup.com wrote:
In the last episode (May 22), Anoop Kumar Narayanan said:
I think glibc uses asynchronous free, as in it doesn't free the memory
immediately. So even though the memory is free'd its still part of the
process's address
In the last episode (May 21), Vikash Badal said:
Excuse me if this is a stupid questions.
I have a thread socket application that seems to be behaving strangely
In a worker thread, I have the following.
CODE---
LogMessage(DEBUG_0, allocated %ld, malloc_usable_size(inst));
I think glibc uses asynchronous free, as in it doesn't free the memory
immediately. So even though the memory is free'd its still part of the
process's address space but present in the free pool and so it doesn't
crash.
-Anoop
On Sat, May 22, 2010 at 12:48 AM, Dan Nelson dnel...@allantgroup.com
In the last episode (May 22), Anoop Kumar Narayanan said:
I think glibc uses asynchronous free, as in it doesn't free the memory
immediately. So even though the memory is free'd its still part of the
process's address space but present in the free pool and so it doesn't
crash.
FreeBSD