8 /****************************************************************************/
9 #if( defined _WIN32 && !defined KERNEL_MODE && NTDDI_VERSION >= NTDDI_WINXP )
11 #pragma warning( disable : 4100 )
13 void benchmark_pal_numa_free( void *memory, lfds710_pal_uint_t size_in_bytes )
18 assert( memory != NULL );
19 // TRD : size_in_bytes can be any value in its range
21 process_handle = GetCurrentProcess();
23 VirtualFreeEx( process_handle, memory, 0, MEM_RELEASE );
28 #pragma warning( default : 4100 )
36 /****************************************************************************/
37 #if( defined __linux__ && defined LIBNUMA )
39 #ifdef BENCHMARK_PAL_NUMA_FREE
40 #error More than one porting abstraction layer matches the current platform in porting_abstraction_free.c
43 #define BENCHMARK_PAL_NUMA_FREE
45 void benchmark_pal_numa_free( void *memory, lfds710_pal_uint_t size_in_bytes )
47 assert( memory != NULL );
48 // TRD : size_in_bytes can be any value in its range
50 #if( defined _POSIX_MEMLOCK_RANGE > 0 )
51 munlock( memory, size_in_bytes );
54 numa_free( memory, size_in_bytes );