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