Porting Guide (benchmark)

From liblfds.org
Revision as of 20:16, 17 February 2017 by Admin (talk | contribs) (1 revision imported)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search


To permit benchmark to work on a range of platforms a porting abstraction layer has been written. Porting simply involves implementing the porting abstraction layer; the library will then compile and work. Implementation involves providing values to a small set defines, macros and typedefs and implementing one or two functions.

The Porting Abstraction Layer

The porting abstraction layer consists of two C and one header files, thus;


Accordingly, to add a new platform, introduce a new #ifdef, which matches the appropriate compiler defined macros for your platform.

The NUMA free/malloc functions only need to be implemented on NUMA systems. On SMP systems, a hosted implementation is assumed, and malloc is used.


void benchmark_pal_numa_free( void *memory, lfds711_pal_uint_t size_in_bytes );


void benchmark_pal_numa_malloc( lfds711_pal_uint_t numa_node_id, lfds711_pal_uint_t size_in_bytes );



See Also