In a message dated 1/11/2004 12:03:36 AM Eastern Standard Time,
[EMAIL PROTECTED] writes:

It  seems that one way to address this memory/heap problem is to force
threads  to exit after a certain amount of time idle, freeing their
entire heap  area.  There is code in AS to do that, but I've never
gotten it to  work successfully because AS tends to "round-robin" the
workload to all  threads.  So they never idle.
Hi,
Unfortunately this isn't possible -- all the memory used by a thread is
simply moved over to the shared area on thread exit.  That memory is  reused by
other threads when needed but the fragmentation remains.  To  reduce
fragmentation the allocator would have to coalesce unused blocks, look  for large
contiguous free zone's, and munmap those region.  This garbage  collection would
require all memory allocation in all threads to stop while  such a scan took place
which would defeat the free-threaded design of the  allocator.  And, the
possibility of such a garbage collection phase would  require locking on all
allocations to check if and when it had started.
-Jim


--
AOLserver - http://www.aolserver.com/

To Remove yourself from this list, simply send an email to <[EMAIL PROTECTED]> with the
body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: field of 
your email blank.

Reply via email to