git: <sys/cdefs.h>: Add support for alloc_align, alloc_size and malloc attributes.

Rimvydas Jasinskas zrj at crater.dragonflybsd.org
Fri Sep 23 23:51:32 PDT 2016


commit bcbc807782fe7ff70dc7481d347f82bfed4bed26
Author: zrj <rimvydas.jasinskas at gmail.com>
Date:   Tue Sep 20 10:27:39 2016 +0300

    <sys/cdefs.h>: Add support for alloc_align, alloc_size and malloc attributes.
    
      * __alloc_align tells the compiler that one of the arguments is a
        minimal alignment for pointer to help with pointers analysis.
      * __alloc_size tells the compiler that one of the arguments is a
        size of a pointer returned by function.
      * __malloclike tells the compiler that returned pointer does not
        alias any other pointer to help futher optimizations.
    
    While there, add partial support for clang (as it is in FreeBSD).

Summary of changes:
 sys/sys/cdefs.h | 20 +++++++++++++++++++-
 1 file changed, 19 insertions(+), 1 deletion(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/bcbc807782fe7ff70dc7481d347f82bfed4bed26


-- 
DragonFly BSD source repository


More information about the Commits mailing list