diff options
Diffstat (limited to 'meta-oe/recipes-benchmark/libhugetlbfs/files/0002-Mark-glibc-specific-code-so.patch')
-rw-r--r-- | meta-oe/recipes-benchmark/libhugetlbfs/files/0002-Mark-glibc-specific-code-so.patch | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/meta-oe/recipes-benchmark/libhugetlbfs/files/0002-Mark-glibc-specific-code-so.patch b/meta-oe/recipes-benchmark/libhugetlbfs/files/0002-Mark-glibc-specific-code-so.patch new file mode 100644 index 0000000000..4354d78615 --- /dev/null +++ b/meta-oe/recipes-benchmark/libhugetlbfs/files/0002-Mark-glibc-specific-code-so.patch | |||
@@ -0,0 +1,39 @@ | |||
1 | From b72bf6a81fa879f32a074fe53776fc8291c83b6f Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Thu, 21 Jun 2018 19:32:59 -0700 | ||
4 | Subject: [PATCH 2/6] Mark glibc specific code so | ||
5 | |||
6 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
7 | --- | ||
8 | morecore.c | 3 ++- | ||
9 | 1 file changed, 2 insertions(+), 1 deletion(-) | ||
10 | |||
11 | diff --git a/morecore.c b/morecore.c | ||
12 | index c5981d2..ec9fafa 100644 | ||
13 | --- a/morecore.c | ||
14 | +++ b/morecore.c | ||
15 | @@ -347,6 +347,7 @@ void hugetlbfs_setup_morecore(void) | ||
16 | |||
17 | INFO("setup_morecore(): heapaddr = 0x%lx\n", heapaddr); | ||
18 | |||
19 | +#ifdef __GLIBC__ | ||
20 | heaptop = heapbase = (void *)heapaddr; | ||
21 | if (__hugetlb_opts.thp_morecore) | ||
22 | __morecore = &thp_morecore; | ||
23 | @@ -354,7 +355,6 @@ void hugetlbfs_setup_morecore(void) | ||
24 | __morecore = &hugetlbfs_morecore; | ||
25 | |||
26 | /* Set some allocator options more appropriate for hugepages */ | ||
27 | - | ||
28 | if (__hugetlb_opts.shrink_ok) | ||
29 | mallopt(M_TRIM_THRESHOLD, hpage_size / 2); | ||
30 | else | ||
31 | @@ -364,4 +364,5 @@ void hugetlbfs_setup_morecore(void) | ||
32 | * This doesn't appear to prohibit malloc() from falling back | ||
33 | * to mmap() if we run out of hugepages. */ | ||
34 | mallopt(M_MMAP_MAX, 0); | ||
35 | +#endif | ||
36 | } | ||
37 | -- | ||
38 | 2.17.1 | ||
39 | |||