Loading...
Searching...
No Matches
numa_malloc.h File Reference

NUMA aware memory allocators. More...

#include "visibility.h"

Namespaces

namespace  PLMD
 Fast (possibly busy-wait-based) barrier type.
 
namespace  PLMD::thread_mpi
 

Functions

TMPI_EXPORT void * PLMD::thread_mpi::tMPI_Calloc_local (size_t nmemb, size_t size)
 Allocate local memory by array and element size.
 
TMPI_EXPORT int PLMD::thread_mpi::tMPI_Free_numa (void *ptr)
 Free memory allocate with any of the NUMA-aware allocators.
 
TMPI_EXPORT void * PLMD::thread_mpi::tMPI_Malloc_local (size_t size)
 Allocate local memory by size in bytes.
 
TMPI_EXPORT void * PLMD::thread_mpi::tMPI_Realloc_local (void *ptr, size_t size)
 Re-allocate to local memory.
 

Detailed Description

NUMA aware memory allocators.

This file provides a NUMA aware version of malloc() and friends to force local allocation, preventing expensive 'remote' memory access.

Note that memory allocated with tMPI_Malloc_local(), etc. MUST be freed with tMPI_Free_numa().

Currently this is only implemented on Windows. Check for the presence of these functions with

#ifdef TMPI_NUMA_MALLOC
....
#endif