• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: leak in example code
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: leak in example code


  • Subject: Re: leak in example code
  • From: "Daniel Birns" <email@hidden>
  • Date: Wed, 23 May 2007 14:57:18 -0700

Jeff,

Thanks for your response.  This leads me to the question about what to use to detect for leaks?  Is the bug with the leaks program something you can characterize so I would know what to look for?  Is there a different tool you would recommend?

--Daniel

On 5/23/07, Jeff Moore <email@hidden> wrote:

On May 23, 2007, at 2:18 PM, Daniel Birns wrote:

> I'm using the 'leaks' command on my code to clean it up, and
> discovered leaks in the audio portion.  I went back to the example I
> used, and discovered that the example also has a leak.
>
> The example code is DefaultOutputUnit, and here's the leak info:
>
>  leaks DefaultOutputUnit
> Process 2242: 2079 nodes malloced for 433 KB
> Process 2242: 2 leaks for 1040 total leaked bytes.
> Leak: 0x01812200  size=1024     string 'DRHT'
>         Call stack: [thread 53]: | 0x1 | start | _start | main |
> TestDefaultAU() | AudioOutputUnitStart | CallComponentDispatch |
> DefaultOutputAUEntry | DefaultOutputAUEntry | AudioDeviceStart |
> HALDevice::StartIOProc(long (*)(unsigned long, AudioTimeStamp
> const*, AudioBufferList const*, AudioTimeStamp const*,
> AudioBufferList*, AudioTimeStamp const*, void*)) |
> HALPlugIn::DeviceStartIOProc(HALObject const&, long (*)(unsigned
> long, AudioTimeStamp const*, AudioBufferList const*, AudioTimeStamp
> const*, AudioBufferList*, AudioTimeStamp const*, void*)) |
> HP_PlugIn_DeviceStart(AudioHardwarePlugInInterface**, unsigned long,
> long (*)(unsigned long, AudioTimeStamp const*, AudioBufferList
> const*, AudioTimeStamp const*, AudioBufferList*, AudioTimeStamp
> const*, void*)) | HP_Device::ExecuteCommand(HP_Command*) |
> HP_IOThread::Start() | CAPThread::Start() | pthread_create | malloc

This is a known bug in the leaks tool showing you a false positive.

> Leak: 0x00313710  size=16       string '`
> 0'
>         Call stack: [thread ffffffff]: | 0x1 | start | _start | main
> | TestDefaultAU() | AudioUnitInitialize | CallComponentDispatch |
> DefaultOutputAUEntry | DefaultOutputAUEntry | DefaultOutputAUEntry |
> DefaultOutputAUEntry | DefaultOutputAUEntry | DefaultOutputAUEntry |
> DefaultOutputAUEntry | 0x700d27dd | AudioConverterNew |
> ConverterRegistry::CreateConverter(StreamDescPair const&,
> AudioConverterChain**, unsigned long, AudioClassDescription*) |
> PCMConverterFactory::BuildConverterChain(StreamDescPair const&,
> AudioConverterChain*, PCMConverterFactory*) |
> PCMConverterFactory::BuildConverterChain2(StreamDescPair const&,
> CAStreamBasicDescription&, AudioConverterChain*) | operator
> new(unsigned long) | malloc

This one, I'm not so sure about. It's probably worth filing a bug
about it so we can check it out.

--

Jeff Moore
Core Audio
Apple


_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription: email@hidden

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: leak in example code
      • From: Jeff Moore <email@hidden>
References: 
 >leak in example code (From: "Daniel Birns" <email@hidden>)
 >Re: leak in example code (From: Jeff Moore <email@hidden>)

  • Prev by Date: Re: leak in example code
  • Next by Date: Re: leak in example code
  • Previous by thread: Re: leak in example code
  • Next by thread: Re: leak in example code
  • Index(es):
    • Date
    • Thread