Re: [Netnice-developer] Re: small fixes in netniced
Status: Alpha
Brought to you by:
taost6
From: Sergei M. <mo...@op...> - 2003-11-23 04:38:54
|
op...@so... wrote: > Hi Sergei, > That's great. Also, all the sprintf() must be replaced with snprintf() > I think I fixed some of these on my obsd port. But since I am still working > on the kernel I didn't have time to commit any changes to netnice and > netniced. I just got them to compile and that was it. If you can take a > look at those, it will be great. Hi Nico, Absolutely, we need to do that. The reason I have not done it yet is that I am considering some more optimizations in s[n]printf() usage. For example, it looks like that Process.pid member variable never changes during the Process object lifecycle. Yet we call sprintf(path, "/proc/%d/sockets", this->pid); in many places. Doing it once in Process' constructor will cost a little memory, but is a good performance improvement. Process.pid also begs to be a constant IMHO. I plan to do some changes like this one in a few days, if you guys don't mind. I will keep you posted. Have a great weekend, Sergei. |