Created
April 22, 2012 21:20
-
-
Save rikaardhosein/2466997 to your computer and use it in GitHub Desktop.
av_malloc_p2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#if CONFIG_MEMALIGN_HACK | |
ptr = malloc(size+ALIGN); | |
if(!ptr) | |
return ptr; | |
diff= ((-(long)ptr - 1)&(ALIGN-1)) + 1; | |
ptr = (char*)ptr + diff; | |
((char*)ptr)[-1]= diff; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment