search for: dtrace_arena

Displaying 1 result from an estimated 1 matches for "dtrace_arena".

2007 Sep 05
4
a piece of code in dtrace pseudo device
Dear all: In dtrace.c, function dtrace_probe_create(), there''re a piece of code: id = (dtrace_id_t)(uintptr_t)vmem_alloc(dtrace_arena, 1, VM_BESTFIT | VM_SLEEP); id is uint32_t, and I think id is used as an index to array dtrace_probes[] but why not just use id = cur_value + 1, cur_value is a global variable to record the lastest id? Is this a trick? for what? Thanks :) Regards, TJ -------------- next part --------------...