Function ndpi_aligned_malloc

Function Documentation

void *ndpi_aligned_malloc(size_t alignment, size_t size)

Allocate aligned memory using nDPI’s memory allocator. This function can be customized via ndpi_set_memory_alloction_functions() to use a custom allocator.

Parameters:
  • the – address of the allocated memory will be a multiple of alignment

  • size – Number of bytes to allocate

Returns:

Pointer to allocated memory, or NULL on failure