*/
#define _LGPL_SOURCE
+#include <config.h>
#include "shm.h"
#include <unistd.h>
#include <fcntl.h>
#include <dirent.h>
#include <lttng/align.h>
#include <limits.h>
+#ifdef HAVE_LIBNUMA
#include <numa.h>
+#endif
#include <helper.h>
#include <ust-fd.h>
int stream_fd,
int cpu)
{
- int oldnode, node;
struct shm_object *shm_object;
+#ifdef HAVE_LIBNUMA
+ int oldnode, node;
oldnode = numa_preferred();
if (cpu >= 0) {
}
if (cpu < 0 || node < 0)
numa_set_localalloc();
+#endif /* HAVE_LIBNUMA */
switch (type) {
case SHM_OBJECT_SHM:
shm_object = _shm_object_table_alloc_shm(table, memory_map_size,
default:
assert(0);
}
+#ifdef HAVE_LIBNUMA
numa_set_preferred(oldnode);
+#endif /* HAVE_LIBNUMA */
return shm_object;
}