Re: [Review] Remove procfs dependency of truss

From: Alfred Perlstein <alfred_at_freebsd.org>
Date: Fri, 6 Apr 2007 08:57:16 -0700
* Howard Su <howard0su_at_gmail.com> [070406 08:00] wrote:
> On 4/6/07, Alfred Perlstein <alfred_at_freebsd.org> wrote:
> >
> >nit: you have new functions like this "void fun(args)", they should
> >be in the form of "void\nfun(args)" (newline after return type)
> I will do a style cleanup.
> >
> >possible issue: is get_string equivelant to the procfs version?
> >meaning, if there's a string that ends at a strange place in the
> >address space will it work any differently?
> I uses a different way. I preallocate a buf to use ptrace to fill it
> once. I limit the size to 1024 as a magic number. if the actual string
> length is smaller than 1024 and has a NUL teminate character, we will
> ignore the left chars. (little performance issue). if the actual
> length is larger than 1024, i place a NUL at 1024. so it will be also
> safe.

I think you'll want to preserve the existing behavior, which is
not to hard limit the max to 1024.  

Otherwise along with the style fixes, it looks good!

-- 
- Alfred Perlstein
Received on Fri Apr 06 2007 - 13:57:15 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:07 UTC