malloc: add alloc_size attribute to functions