re PR bootstrap/12804 (zone allocator is broken on 64bit)
PR bootstrap/12804 * ggc-zone.c (struct alloc_chunk): Remove attribute packed. (MAX_FREE_BIN_SIZE): Increase on 64-bit targets. (ggc_free): Remove incorrect freeing. (sweep_pages): Advance PP for large pages. Fix indentation. From-SVN: r85194
This commit is contained in:
parent
35b6b437aa
commit
02aebac6c9
2 changed files with 13 additions and 8 deletions
|
@ -1,3 +1,11 @@
|
|||
2004-07-26 Daniel Jacobowitz <dan@debian.org>
|
||||
|
||||
PR bootstrap/12804
|
||||
* ggc-zone.c (struct alloc_chunk): Remove attribute packed.
|
||||
(MAX_FREE_BIN_SIZE): Increase on 64-bit targets.
|
||||
(ggc_free): Remove incorrect freeing.
|
||||
(sweep_pages): Advance PP for large pages. Fix indentation.
|
||||
|
||||
2004-07-26 Richard Sandiford <rsandifo@redhat.com>
|
||||
|
||||
PR rtl-optimization/16643
|
||||
|
|
|
@ -162,7 +162,7 @@ struct alloc_chunk {
|
|||
double align_d;
|
||||
#endif
|
||||
} u;
|
||||
} __attribute__ ((packed));
|
||||
};
|
||||
|
||||
#define CHUNK_OVERHEAD (offsetof (struct alloc_chunk, u))
|
||||
|
||||
|
@ -177,7 +177,7 @@ struct alloc_chunk {
|
|||
on a PowerPC G4 7450 - 667 mhz, and a Pentium 4 - 2.8ghz,
|
||||
these were determined to be the optimal values. */
|
||||
#define NUM_FREE_BINS 64
|
||||
#define MAX_FREE_BIN_SIZE 256
|
||||
#define MAX_FREE_BIN_SIZE (64 * sizeof (void *))
|
||||
#define FREE_BIN_DELTA (MAX_FREE_BIN_SIZE / NUM_FREE_BINS)
|
||||
#define SIZE_BIN_UP(SIZE) (((SIZE) + FREE_BIN_DELTA - 1) / FREE_BIN_DELTA)
|
||||
#define SIZE_BIN_DOWN(SIZE) ((SIZE) / FREE_BIN_DELTA)
|
||||
|
@ -761,10 +761,6 @@ ggc_free (void *p)
|
|||
|
||||
/* Poison the chunk. */
|
||||
poison_chunk (chunk, ggc_get_size (p));
|
||||
|
||||
/* XXX: We only deal with explicitly freeing large objects ATM. */
|
||||
if (chunk->large)
|
||||
free (p);
|
||||
}
|
||||
|
||||
/* If P is not marked, mark it and return false. Otherwise return true.
|
||||
|
@ -990,13 +986,14 @@ sweep_pages (struct alloc_zone *zone)
|
|||
if (((struct alloc_chunk *)p->page)->mark == 1)
|
||||
{
|
||||
((struct alloc_chunk *)p->page)->mark = 0;
|
||||
pp = &p->next;
|
||||
}
|
||||
else
|
||||
{
|
||||
*pp = next;
|
||||
#ifdef ENABLE_GC_CHECKING
|
||||
/* Poison the page. */
|
||||
memset (p->page, 0xb5, p->bytes);
|
||||
/* Poison the page. */
|
||||
memset (p->page, 0xb5, p->bytes);
|
||||
#endif
|
||||
free_page (p);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue