Subj : Re: String memory Allocation To : borland.public.cpp.borlandcpp From : Ed Mulroy [TeamB] Date : Mon Oct 04 2004 09:45 pm It is not as involved as you think. On the first call the pointer to the string to search and the pointer to the search elements are passed to the function. On subsequent calls the pointer to the string to search argument is NULL. For a single-threaded version of the function it must keep a pointer to the character following what it has already searched. It can do that with a static variable, a pointer. For multi-threaded programs the runtime library sets up a memory block for storage related to the instance of the thread so instead of a single static variable, it maintains a single variable in each of the thread memory blocks. I used "TLS", an akronym which stands for "Thread Local Storage". .. Ed > M. Finch wrote in message > news:4161d882$1@newsgroups.borland.com... > oh my!!! > > I'm going to have to spend some time looking at this as you just > blew WAY > past my knowledge level on this. > > Thank you gentlemen. > I appreciate the input. .