mirror of
https://sourceware.org/git/glibc.git
synced 2025-08-10 05:03:06 +03:00
malloc: Add THP/madvise support for sbrk
To increase effectiveness with Transparent Huge Page with madvise, the large page size is use instead page size for sbrk increment for the main arena. Checked on x86_64-linux-gnu. Reviewed-by: DJ Delorie <dj@redhat.com>
This commit is contained in:
@@ -60,4 +60,12 @@
|
||||
#define PTR_ALIGN_UP(base, size) \
|
||||
((__typeof__ (base)) ALIGN_UP ((uintptr_t) (base), (size)))
|
||||
|
||||
/* Check if BASE is aligned on SIZE */
|
||||
#define PTR_IS_ALIGNED(base, size) \
|
||||
((((uintptr_t) (base)) & (size - 1)) == 0)
|
||||
|
||||
/* Returns the ptrdiff_t diference between P1 and P2. */
|
||||
#define PTR_DIFF(p1, p2) \
|
||||
((ptrdiff_t)((uintptr_t)(p1) - (uintptr_t)(p2)))
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user