[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gcl-devel] Re: Uninitialized stack gaps and conservative garbage collec
[Gcl-devel] Re: Uninitialized stack gaps and conservative garbage collection
Tue, 24 May 2005 20:07:03 -0400
Mozilla Thunderbird 1.0.2 (Macintosh/20050317)
Camm Maguire wrote:
For very large systems, the likelihood of holding onto objects which
should be collected increases. In looking into this, it has come to
my attention that regardless of how carefully the C programmer
initializes variables on the stack, gcc will quite commonly allocate
extra space inaccessbile via any C variable. These 'stack gaps' can
wind up permanently preventing a large portion of user memory from
ever being collected with this algorithm.
Ideally, I'd like to be able to have each C function carefully
initialize a contiguous stack to minimize or eliminate this problem.
Even better would be a gcc switch which would simply zero out each
stack frame at the beginning of each function, though this could be
expensive in terms of performance. Advice is most appreciated. I'd
Not directly related, perhaps, but CMUCL has a similar problem. There's
a control stack that is allocated in the same way with areas on the
stack not initialized in any way, which can cause garbage to be retained.
On the sparc port, this area can be zeroed out with appropriate
optimization settings. I ran some tests using Eric Marsden's cl-bench.
If the stack is always cleared, the cost of some benchmarks go up,
but some go down, because the cost of GC is decreased. (The benchmarks
include GC time.)
Anyway, just some random information.