X-Git-Url: https://ruderich.org/simon/gitweb/?p=coloredstderr%2Fcoloredstderr.git;a=blobdiff_plain;f=src%2Fconstants.h;h=66fe03feecc909f00c3baf5198ea10fad0f1b4c5;hp=f7c9b77b1cde6b3cf18a55486f2d0d51bf53db06;hb=c2097785e752fee94c5c9ef46f03b8312694251a;hpb=5c8b5233fbadc8963cef28d851599bf4c34d271a diff --git a/src/constants.h b/src/constants.h index f7c9b77..66fe03f 100644 --- a/src/constants.h +++ b/src/constants.h @@ -30,6 +30,10 @@ #define DEFAULT_PRE_STRING "\e[91m" #define DEFAULT_POST_STRING "\e[0m" +/* Number of elements to allocate statically. Highest descriptor observed in + * normal use was 255 (by bash), which yielded this limit to prevent + * unnecessary calls to malloc() whenever possible. */ +#define TRACKFDS_STATIC_COUNT 256 /* Number of new elements to allocate per realloc(). */ #define TRACKFDS_REALLOC_STEP 10