rem: Ns_TlsAlloc(&conntls, NULL); Ns_TlsAlloc(&buftls, ns_free);
context: NsStartServer(void){    int n;    Ns_MutexSetName2(&lock, "nsd", "connqueue");    if (nsconf.serv.stats & STATS_PERURL) {	statsCache = Ns_CacheCreateSz("urlstats", TCL_STRING_KEYS, nsconf.serv.maxurlstats, ns_free);    }    Ns_TlsAlloc(&conntls, NULL);    Ns_TlsAlloc(&buftls, ns_free);    /*     * Pre-allocate all available connection structures to avoid having     * to repeatedly allocate and free them at run time and to ensure there     * is a per-set maximum number of simultaneous connections to handle     * before Ns_QueueConn begins to return NS_ERROR.     */    connBufPtr = ns_malloc(sizeof(Conn) * nsconf.serv.maxconns);    for (n = 0; n < nsconf.serv.maxconns - 1; ++n) {	connBufPtr[n].nextPtr = &connBufPtr[n+1];    }    connBufPtr[n].nextPtr = NULL;    firstFreeConnPtr = &connBufPtr[0];    /*     * Determine the minimum and maximum number of threads, adjusting the     * values as needed.  The threadtimeout value is the maximum number of     * seconds a thread will wait for a connection before exiting if the     * current number of threads is above the minimum.     */    if (nsconf.serv.maxthreads > nsconf.serv.maxconns) {	Ns_Log(Warning, "serv: cannot have more maxthreads than maxconns: "	       "%d max threads adjusted down to %d max connections",	       nsconf.serv.maxthreads, nsconf.serv.maxconns);	nsconf.serv.maxthreads = nsconf.serv.maxconns;    }    if (nsconf.serv.minthreads > nsconf.serv.maxthreads) {	Ns_Log(Warning, "serv: cannot have more minthreads than maxthreads: "	       "%d min threads adjusted down to %d max threads",	       nsconf.serv.minthreads, nsconf.serv.maxthreads);	nsconf.serv.minthreads = nsconf.serv.maxthreads;    }        /*     * Finally, create the accept thread which will begin servicing client     * connections and the minimum number of connection threads.     */    currentThreads = idleThreads = nsconf.serv.minthreads;    for (n = 0; n < nsconf.serv.minthreads; ++n) {    	CreateConnThread();    }}