blob: 5957aef29e0d3e249437cc0ddb887bf72c8245f8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
diff -Naur LVM2.2.02.166.orig/lib/mm/memlock.c LVM2.2.02.166/lib/mm/memlock.c
--- LVM2.2.02.166.orig/lib/mm/memlock.c 2016-09-26 06:21:54.000000000 -0700
+++ LVM2.2.02.166/lib/mm/memlock.c 2016-10-23 15:43:03.957002700 -0700
@@ -173,6 +173,7 @@
* MMAP'd memory directly. Since MMAP-as-MORECORE does not munmap the
* memory on free(), this is good enough for our purposes.
*/
+#ifdef __GLIBC__
while (missing > 0) {
struct mallinfo inf = mallinfo();
hblks = inf.hblks;
@@ -200,14 +201,17 @@
break;
}
}
+#endif
if ((_malloc_mem = malloc(_size_malloc)))
_touch_memory(_malloc_mem, _size_malloc);
+#ifdef __GLIBC__
/* free up the reserves so subsequent malloc's can use that memory */
for (i = 0; i < area; ++i)
free(areas[i]);
#endif
+#endif
}
static void _release_memory(void)
diff -Naur LVM2.2.02.166.orig/libdaemon/server/daemon-server.c LVM2.2.02.166/libdaemon/server/daemon-server.c
--- LVM2.2.02.166.orig/libdaemon/server/daemon-server.c 2016-09-26 06:21:55.000000000 -0700
+++ LVM2.2.02.166/libdaemon/server/daemon-server.c 2016-10-23 15:43:25.962220845 -0700
@@ -18,6 +18,7 @@
#include "daemon-server.h"
#include "daemon-log.h"
+#include <fcntl.h>
#include <dlfcn.h>
#include <errno.h>
#include <pthread.h>
|