[Review] Remove procfs dependency of truss
alfred at freebsd.org
Fri Apr 6 15:57:15 UTC 2007
* 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
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
More information about the freebsd-current