[dtrace-discuss] a piece of dtrace source code

陶捷 Tao Jie eulertao at gmail.com
Sat Jul 7 11:28:15 PDT 2007


err... I think this should be a bug.  the correct code is
sizeof (dt_proc_t *) * *(*_dtrace_pidbuckets *- 1)*, isn't it?


2007/7/7, 陶捷 Tao Jie <eulertao at gmail.com>:
>
> Dear all:
>
> in file dt_proc.c
>
> void
> dt_proc_hash_create(dtrace_hdl_t *dtp)
> {
>  if ((dtp->dt_procs = dt_zalloc(dtp, sizeof (dt_proc_hash_t) +
>      sizeof (dt_proc_t *) * _dtrace_pidbuckets *- 1*)) != NULL) {
> ......
> ......
> ......
>
>
> Why does the size minus one? I have no idea about this :(
>
>
>
> Regards
> TJ
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.opensolaris.org/pipermail/dtrace-discuss/attachments/20070708/f1f969d6/attachment.html 


More information about the dtrace-discuss mailing list