mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-08-04 09:30:00 +03:00
Remove mmap_unaligned.
Remove mmap_unaligned, which was used to heuristically decide whether to optimistically call mmap() in such a way that could reduce the total number of system calls. If I remember correctly, the intention of mmap_unaligned was to avoid always executing the slow path in the presence of ASLR. However, that reasoning seems to have been based on a flawed understanding of how ASLR actually works. Although ASLR apparently causes mmap() to ignore address requests, it does not cause total placement randomness, so there is a reasonable expectation that iterative mmap() calls will start returning chunk-aligned mappings once the first chunk has been properly aligned.
This commit is contained in:
parent
7ad54c1c30
commit
a8f8d7540d
6 changed files with 29 additions and 101 deletions
12
src/chunk.c
12
src/chunk.c
|
|
@ -274,7 +274,7 @@ chunk_dealloc(void *chunk, size_t size, bool unmap)
|
|||
}
|
||||
|
||||
bool
|
||||
chunk_boot0(void)
|
||||
chunk_boot(void)
|
||||
{
|
||||
|
||||
/* Set variables according to the value of opt_lg_chunk. */
|
||||
|
|
@ -301,13 +301,3 @@ chunk_boot0(void)
|
|||
|
||||
return (false);
|
||||
}
|
||||
|
||||
bool
|
||||
chunk_boot1(void)
|
||||
{
|
||||
|
||||
if (chunk_mmap_boot())
|
||||
return (true);
|
||||
|
||||
return (false);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue