mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-24 10:45:42 +00:00
Bug 884562 - Allow root analysis to be enabled when using generational GC; r=sfink DONTBUILD
--HG-- extra : rebase_source : 6438eec44aa7de79bf78c8f84fb4b971e1e83296
This commit is contained in:
parent
18d8acd4f5
commit
74452ff20c
@ -36,6 +36,19 @@ js::Nursery::init()
|
||||
fallbackBitmap.clear(false);
|
||||
|
||||
void *heap = MapAlignedPages(NurserySize, Alignment);
|
||||
#ifdef JSGC_ROOT_ANALYSIS
|
||||
// Our poison pointers are not guaranteed to be invalid on 64-bit
|
||||
// architectures, and often are valid. We can't just reserve the full
|
||||
// poison range, because it might already have been taken up by something
|
||||
// else (shared library, previous allocation). So we'll just loop and
|
||||
// discard poison pointers until we get something valid.
|
||||
//
|
||||
// This leaks all of these poisoned pointers. It would be better if they
|
||||
// were marked as uncommitted, but it's a little complicated to avoid
|
||||
// clobbering pre-existing unrelated mappings.
|
||||
while (IsPoisonedPtr(heap) || IsPoisonedPtr((void*)(uintptr_t(heap) + NurserySize)))
|
||||
heap = MapAlignedPages(NurserySize, Alignment);
|
||||
#endif
|
||||
if (!heap)
|
||||
return false;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user