On 2011-05-17, at 5:08 AM, Lukas Czerner <lczerner@xxxxxxxxxx> wrote: > On Mon, 16 May 2011, Andreas Dilger wrote: >> >> Because this will be linked into libext2fs, all of these functions should be converted to use the libext2 helper functions for portability reasons. >> >> s/malloc(/,ext2fs_get_mem(/g >> >> though in some places ext2fs_get_array() is preferable, since it does overflow checking. > > I will change malloc to ext2fs_get_mem, but leave calloc as it is since > it will zero the memory as well unliki ext2fs_get_array(). Please use ext2fs_get_mem() and memset then. I've been thinking for a while to add proper memory accounting to libext2fs for large filesystems. The current use of the system memory accounting will overflow at 32-bit values, so cannot properly account for checking very large filesystems where we already know that e2fsck is allocating more that 4GB. Keeping matching ext2_get_mem() and ext2fs_free_mem() is important for a number of reasons. Cheers, Andreas-- To unsubscribe from this list: send the line "unsubscribe linux-ext4" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html