>>> On 11/25/2009 at 10:19 AM, in message <008b01ca6df3$823a2690$86ae73...@com>,
"Sylvester Steele" <[email protected]> wrote:
>> >My guess is because you have static string pointers being passed from a
> DSO module to gmond.  I would suggest using apr_pstrdup(p, <string literal
>>>here>) to allocate the memory from an APR memory pool before handing the
> pointers back to gmond.
> 
> Thanks Brad- that helped, but I am still getting a seg fault from the second
> line:
> 
> gmi = (Ganglia_25metric*)apr_array_push(metric_info);
> memset (gmi, 0, sizeof(*gmi));
> 
> I am doing this to set the last metric to null. Why should this be
> happening? BTW- my metric_info has size=10 and I am putting in only two
> metrics before this (The null metric is the third)
> 
> 

I don't know why you would be getting a segfault on this line.  Gmond expects 
the array to be NULL terminated so all you are doing is adding one extra entry 
and filling it will NULLs.  With the array being NULL terminated, gmond doesn't 
have to keep track of the metric count, it only has to look for a NULL entry.

Brad


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Ganglia-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ganglia-developers

Reply via email to