Skip to content

Instantly share code, notes, and snippets.

View EdwardNewgate's full-sized avatar

Shirohige EdwardNewgate

View GitHub Profile
@EdwardNewgate
EdwardNewgate / alloc_align.c
Last active September 14, 2015 15:14
allocate buffer considering memory alignment
/*---------------------------------------------------------------------------*
* Function: allocate buffer considering memory alignment
* Parameters: align: alignment to consider
* size: size of buffer to allocate
* Input: none
* Output: none
* Return: 0 => ok
* !0 => error
*----------------------------------------------------------------------------*/