Commit 4746806f authored by simonmar's avatar simonmar
Browse files

[project @ 2001-11-28 14:47:54 by simonmar]

Cross fingers and remove code that zeroes the nursery when doing LDV
profiling.  This was required for two reasons:

  - the compiler might leave slop between objects when it is
    allocating.  However, it doesn't do this any more: we always
    move the heap pointer back at the end of a basic block if it
    turns out we didn't need all the heap,

  - After a heap check failure, we don't know what the previous
    value of Hp was, so we don't know where the end of the real
    data in the current nursery block is.

    This isn't the case any more, because as a side effect of the
    fixes to support big-block allocation we always shift Hp back
    by the required amount after a heap check failure, so now
    bd->free always points to the byte after the last allocated
    byte in a nursery block.
parent 4321b113
/* -----------------------------------------------------------------------------
* $Id: Storage.c,v 1.56 2001/11/28 14:30:32 simonmar Exp $
* $Id: Storage.c,v 1.57 2001/11/28 14:47:54 simonmar Exp $
* (c) The GHC Team, 1998-1999
......@@ -335,19 +335,6 @@ resetNurseries( void )
for (bd = g0s0->blocks; bd; bd = bd->link) {
// Reset every word in the nursery to zero when doing LDV profiling.
// This relieves the mutator of the burden of zeroing every new closure,
// which is stored in the nursery.
// Todo: make it more efficient, e.g. memcpy()
StgPtr p;
if (RtsFlags.ProfFlags.doHeapProfile == HEAP_BY_LDV) {
for (p = bd->start; p < bd->start + BLOCK_SIZE_W; p++)
*p = 0;
bd->free = bd->start;
ASSERT(bd->gen_no == 0);
ASSERT(bd->step == g0s0);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment