mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
mm: preallocate memory only with glibc
Use mallinfo() only with glibc.
This commit is contained in:
parent
5aa8683e86
commit
8370d117d7
@ -159,7 +159,12 @@ static void _touch_memory(void *mem, size_t size)
|
||||
|
||||
static void _allocate_memory(void)
|
||||
{
|
||||
#ifndef VALGRIND_POOL
|
||||
#if defined(__GLIBC__) && !defined(VALGRIND_POOL)
|
||||
/* Memory allocation is currently only tested with glibc
|
||||
* for different C libraries, some other mechanisms might be needed
|
||||
* meanwhile let users use lvm2 code without memory preallocation.
|
||||
* Compilation for VALGRIND tracing also goes without preallocation.
|
||||
*/
|
||||
void *stack_mem;
|
||||
struct rlimit limit;
|
||||
int i, area = 0, missing = _size_malloc_tmp, max_areas = 32, hblks;
|
||||
|
Loading…
Reference in New Issue
Block a user