Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8344649
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T06:26:20+00:00 2026-06-09T06:26:20+00:00

I am currently reading audio floats from a file using Dirac’s (OSStatus) readFloatsConsecutive:(SInt64)numFrames intoArray:(float**)audio

  • 0

I am currently reading audio floats from a file using Dirac’s (OSStatus) readFloatsConsecutive:(SInt64)numFrames intoArray:(float**)audio function. I create a pointer of float **

arrayToFill = malloc(channelCount * sizeof(float*));

for(int i = 0; i < channelCount; ++i)
{
    arrayToFill[i] = malloc(frameCount * sizeof(float));
}

and pass it to the Dirac function I get a massive memory spike when all the floats are malloced.

In instruments I get spikes that increase about 90MB, and for some reason this app still runs on the device.

would e.g. 15839544 * 2 number of floats cause these massive spikes?

How can it use so much memory? Is it virtual memory? I dont see any VM allocations.

I dont see how loading a single file of e.g. 5MB audio file can result in such massive spikes in memory.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T06:26:21+00:00Added an answer on June 9, 2026 at 6:26 am

    would e.g. 15839544 * 2 number of floats cause these massive spikes?

    Yes, absolutely. A float is 4 bytes, so two arrays of 15.8 million floats apiece is around 120 MB total.

    As far as how you’re ending up with this from a 5 MB input file: Audio compression is an amazing thing. 🙂

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am currently reading information from an input file. Of that information, there is
I am currently reading a CSV file. I have to extract the dates from
I'm currently reading in MIDI messages in real-time from my midi keyboard using a
I am currently reading from an ini file with a key/value pair. i.e. isValid
I'm currently reading the boot.s file in the source for the first ever Linux
I'm currently reading a regularly updated XML file with PHP (simpleXML). I'd like to
Hey I am currently reading in a XML file which contains bullet list in
I'm currently reading in a text file containing the following lines: 0 24000 97200
I am currently reading Beginning CakePHP:From Novice to Professional by David Golding. At one
I am currently reading a stream from a URL. And saving this as a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.