numam-dpdk/lib/librte_malloc
Cunming Liang b94580d688 malloc: avoid unknown socket id
Add check for rte_socket_id(), avoid get unexpected return like (-1).
By using rte_malloc_socket(), socket id is assigned by socket_arg.
If socket_arg set to SOCKET_ID_ANY, it expects to use the socket id to which the current cores belongs.
As the thread may affinity on a cpuset, the cores in the cpuset may belongs to different NUMA nodes.
The value of _socket_id probably be SOCKET_ID_ANY(-1), the case is not expected in origin malloc_get_numa_socket().

Signed-off-by: Cunming Liang <cunming.liang@intel.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
2015-02-24 20:22:34 +01:00
..
Makefile mk: add library version extension 2015-02-03 16:56:58 +01:00
malloc_elem.c add prefix to cache line macros 2014-11-27 16:21:11 +01:00
malloc_elem.h lib: fix cache alignment of structures 2014-12-11 01:42:02 +01:00
malloc_heap.c add prefix to cache line macros 2014-11-27 16:21:11 +01:00
malloc_heap.h malloc: avoid unknown socket id 2015-02-24 20:22:34 +01:00
rte_malloc_version.map lib: provide initial versioning 2015-02-03 16:56:58 +01:00
rte_malloc.c mem: fix alignment parameter check 2015-01-19 09:36:55 +01:00
rte_malloc.h remove trailing whitespaces 2014-06-11 00:29:34 +02:00