Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re^2: [Ceph::RADOS] Help Debugging Inline C

by syphilis (Archbishop)
on Nov 07, 2013 at 22:17 UTC ( [id://1061636]=note: print w/replies, xml ) Need Help??


in reply to Re: [Ceph::RADOS] Help Debugging Inline C
in thread [Ceph::RADOS] Help Debugging Inline C

Using Newx (a malloc) will just leak the memory

How would that happen ? Surely the allocated memory is being freed (Safefree(b)) before the function returns ?

Cheers,
Rob

Replies are listed 'Best First'.
Re^3: [Ceph::RADOS] Help Debugging Inline C
by oiskuu (Hermit) on Nov 08, 2013 at 02:35 UTC
    You are trying to free b which points somewhere into the allocated buffer. I hope you do make use of malloc debuggers :-)

    Also, if rados_pool_list() returned negative, you'd be allocating 4GB chunks something bogus (not sure what casts and/or checks are involved).

    Like I said, the rados code seems to be in flux. Take a look at librados.cc. Looks messy to me.

      You are trying to free b which points somewhere into the allocated buffer

      Duh!! ... of course ... thanks.

      Cheers,
      Rob.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1061636]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (9)
As of 2024-03-28 12:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found