]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
add a few things, pretty-print the strings, sort alphabetically
authorAlan T. DeKok <aland@freeradius.org>
Fri, 8 Apr 2022 14:00:00 +0000 (10:00 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Fri, 8 Apr 2022 19:48:52 +0000 (15:48 -0400)
src/bin/radsizes.c

index 10d27a09bbf1a59fcfa0dc619cb1766dc16adab6..8e3693c582c43be41c07c3317e60c88560bcc520 100644 (file)
@@ -3,19 +3,24 @@
 #include <freeradius-devel/unlang/xlat_priv.h>
 #include <freeradius-devel/server/tmpl.h>
 #include <freeradius-devel/util/value.h>
+#include <freeradius-devel/util/rb.h>
 
 int main(UNUSED int argc, UNUSED char **argv)
 {
-#define SIZEOF(_struct)        printf("%s %zu bytes\n", STRINGIFY(_struct), sizeof(_struct))
+#define SIZEOF(_struct)        printf("%-24s\t%zu bytes\n", STRINGIFY(_struct), sizeof(_struct))
+
+       SIZEOF(fr_pair_t);
+       SIZEOF(fr_pair_list_t);
+       SIZEOF(fr_rb_node_t);
+       SIZEOF(fr_value_box_t);
 
-       SIZEOF(xlat_exp_t);
-       SIZEOF(xlat_call_t);
        SIZEOF(tmpl_t);
-       SIZEOF(tmpl_rules_t);
        SIZEOF(tmpl_attr_rules_t);
+       SIZEOF(tmpl_rules_t);
        SIZEOF(tmpl_xlat_rules_t);
-       SIZEOF(fr_value_box_t);
-       SIZEOF(fr_pair_t);
+
+       SIZEOF(xlat_call_t);
+       SIZEOF(xlat_exp_t);
 
        return 0;
 }