On 20 Mar 2015 13:30, Dmitry V. Levin wrote: > On Fri, Mar 20, 2015 at 02:53:39PM +0900, Masatake YAMATO wrote: > > In strace following code sentences are frequently used: > > > > var = malloc(fdsize); > > if (!var) > > die_out_of_memory(); > > > > This patch introduces xmalloc and friends which simplify > > above sentences like: > > > > var = xmalloc(fdsize); > > > > Here friends are xcalloc and xrealloc. > > Do we need xrealloc in its classic form, or rather an edition > with an integer overflow check?
a xcalloc variant that doesn't clear memory would be nice (and checks the multiplication), although i think we can merge this one as-is and build on top of it. is there a standard naming for the array allocator ? -mike
signature.asc
Description: Digital signature
------------------------------------------------------------------------------ Dive into the World of Parallel Programming The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net/
_______________________________________________ Strace-devel mailing list Strace-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/strace-devel