[dtrace-discuss] Re: allocated buffer in real time
Lafontaine
fablaf61 at hotmail.com
Tue Jun 12 05:51:36 PDT 2007
Hi!
I found a solution:
pid$1::*__1cKmem_alloc_6FkIkiknJBoolean_t_1pkc_pv_*:return
{
printf("allocmem: #%x \n",arg1);
x = arg1;
bufs[x] = x;
@bufs[x] = sum(x);
}
pid$1::*__1cJmem_free_6FkIppvkipkc_nJRC_Code_t__*:entry
/bufs[*(uint32_t *)copyin(arg1,sizeof(uint32_t))]/
{
self->add=*(uint32_t *)copyin(arg1,sizeof(uint32_t));
printf("freemem: #%x \n",self->add);
y=self->add;
@bufs[bufs[self->add]] = sum(-y);
bufs[self->add] = 0;
}
if the memory is allocated, the value is the adress.
if the memory is freed, the value is 0.
--
This message posted from opensolaris.org
More information about the dtrace-discuss
mailing list